[oe] Problem with dependencies in packages

Graham Gower graham.gower at gmail.com
Mon Feb 14 00:29:03 UTC 2011


On 14 February 2011 09:20, Filip Zyzniewski <filip.zyzniewski at gmail.com> wrote:
> Hi,
>
> I think I have found a problem with versioned dependencies (or I don't
> unserstand something).
>
> I am trying to switch the jlime distribution from ipk to deb packages.
> When debugging do_rootfs problems I stumbled upon this:
>
> The following packages have unmet dependencies:
>  libncursesw5: Depends: libtinfo5 (>= 5.7+20110115) but 5.7-r16 is to
> be installed
> E: Broken packages
>
> The Depends line in deb package control file comes from
> classes/package_deb.bbclass:do_package_deb():
>
> rdepends = explode_deps(unicode(bb.data.getVar("RDEPENDS", localdata, 1) or ""))
> [...]
> ctrlfile.write(u"Depends: %s\n" % ", ".join(rdepends))
>
>
> The dependency string comes from classes/package.bbclass:766:
> dep = "%s (>= %s)" % (dep_pkg, ver_needed)
>
> ver_needed comes (in case of ncurses) from .ver files in the build
> tree, generated by the same function a bit earlier using pkgver
> variable set in lines 657-661:
>
>                pkgver = bb.data.getVar('PKGV_' + pkg, d, True)
>                if not pkgver:
>                        pkgver = bb.data.getVar('PV_' + pkg, d, True)
>                if not pkgver:
>                        pkgver = ver
>
> and in ncurses_5.7.bb we have:
>
> PATCHDATE = "20110115"
> PKGV = "${PV}+${PATCHDATE}"
>
>
> Isn't this an incosistency that ncurses_5.7-r16 depends on
> libtinfo5_5.7+20110115 ? Shouldn't it depend on libtinfo5_5.7-r16?

Probably.

> What's the reason for this situation? Does opkg somehow compare these
> versions in another way causing the problem to be invisible?

Opkg uses the same version comparison as dpkg. In fact, the
verrevcmp() code in opkg was copied verbatim from dpkg. The ascii
values of '+' and '-' are compared, with '+' being lower than '-'.

# opkg compare-versions 5.7-r16 ">=" 5.7+20110115
# echo $?
0

So, 5.7-r16 would be expected to satisfy the dependency in this case.
I am unsure why the version comparison fails for you... maybe the dpkg
comparison code has been changed since it was copied into ipkg?

> bye,
> Filip Zyzniewski

-Graham




More information about the Openembedded-devel mailing list