Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120331 - Portage doesn't resolve versioned optional dependencies properly when an older version of one of those dependencies is already installed
Summary: Portage doesn't resolve versioned optional dependencies properly when an olde...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 115839
Blocks:
  Show dependency tree
 
Reported: 2006-01-25 11:59 UTC by Stefan Kiesler
Modified: 2006-01-25 14:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Kiesler 2006-01-25 11:59:26 UTC
OK, sorry for the catchy title. :-)
By "versioned optional dependencies" I mean ebuilds that depend on a certain functionality, but the user may choose between two or more packages that offer this functionality. Not talking about virtuals though.

Take the following RDEPEND line in the baselayout-1.11.14-r2 ebuild:

|| ( >=sys-fs/udev-070 >=sys-fs/devfsd-1.3.25-r9 )

I'm running Kernel 2.4 with devfsd-1.3.25-r8 installed. So big surprise after running emerge -pu world:

[ebuild  N    ] sys-apps/hotplug-base-20040401
[ebuild  N    ] sys-fs/udev-079-r1
[ebuild     U ] sys-apps/baselayout-1.11.14-r2 [1.11.13-r1]

Huh? Udev? On a 2.4-only system? With devfsd installed? That's gonna hurt.

Why isn't portage trying to update devfsd? Baselayout requires that either package A or package B should be installed, each of them should match some specified versions, >=A-x.y.z or >=B-a.b.c.
There's no version of A installed, but there's an older version of B.
I guess the least expected action for portage to take now is ignoring the installed B and installing a completely useless A now.

It's getting worse. Compare the above output to that of emerge -puD world:

[ebuild     U ] sys-devel/gcc-config-1.3.12-r6 [1.3.12-r4]
[ebuild  N    ] virtual/libintl-0
[ebuild  N    ] app-misc/ca-certificates-20050804
[ebuild     U ] dev-util/pkgconfig-0.20 [0.17.2-r1]
[ebuild  N    ] perl-core/Test-Simple-0.62
[ebuild     U ] dev-perl/Locale-gettext-1.05 [1.03]
[ebuild     U ] perl-core/digest-base-1.13 [1.10]
[ebuild     U ] sys-fs/devfsd-1.3.25-r9 [1.3.25-r8]
[ebuild     U ] dev-libs/libgcrypt-1.2.2-r1 [1.2.1]
[ebuild     U ] dev-perl/TermReadKey-2.30 [2.21]
[ebuild     U ] media-libs/gd-2.0.33 [2.0.32]
[ebuild     U ] sys-apps/baselayout-1.11.14-r2 [1.11.13-r1]
[ebuild     U ] dev-perl/yaml-0.39 [0.36]
[ebuild     U ] dev-perl/IO-Zlib-1.04 [1.01]
[ebuild     U ] dev-perl/IO-String-1.07 [1.05]
[ebuild     U ] dev-perl/module-build-0.26.11 [0.25]
[ebuild     U ] perl-core/File-Spec-3.12 [3.06]

Just because devfsd happens to appear on this list before baselayout, udev is being ignored.

Whereas an emerge -puD baselayout reveals:

[ebuild     U ] sys-devel/gcc-config-1.3.12-r6 [1.3.12-r4]
[ebuild  N    ] virtual/libintl-0
[ebuild  N    ] app-misc/ca-certificates-20050804
[ebuild  N    ] perl-core/Test-Simple-0.62
[ebuild     U ] dev-perl/Locale-gettext-1.05 [1.03]
[ebuild  N    ] sys-apps/hotplug-base-20040401
[ebuild  N    ] sys-fs/udev-079-r1
[ebuild     U ] sys-apps/baselayout-1.11.14-r2 [1.11.13-r1]

Maybe there's another way for baselayout to handle this dependency correctly (I don't know how, the dev-manager virtual cannot remedy this), but anyway I think this is a portage problem, because portages behaviour should always be predictable. Portage shouldn't try to be a random generator.

emerge info:

Portage 2.0.54 (hardened/x86, gcc-3.4.4, glibc-2.3.5-r2, 2.4.32-hardened i586)
=================================================================
System uname: 2.4.32-hardened i586 AMD-K6(tm) 3D processor
Gentoo Base System version 1.6.13
distcc 2.18.3 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-march=k6-2 -O2 -pipe"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k6-2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://horst.ranzbude.lan/wh/data/Software/Linux/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
LANG="de_DE@euro"
LINGUAS="de"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow acl apache2 berkdb bzip2 crypt cups curl dlloader ethereal expat foomaticdb gd gdbm gpm hardened imagemagick java jpeg libwww maildir mbox mhash mysql ncurses nls pam pdflib perl pic png ppds prelude python readline slang snmp socks5 ssl tcpd tiff userlocales x86 xml2 zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, MAKEOPTS, PORTDIR_OVERLAY
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2006-01-25 14:58:16 UTC
This was fixed as part of another bug in 2.1_pre2 I think it was.