Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453826 - sys-apps/portage-2.1.11.31: Omits a package dep on 'emerge -e world'; allows change in pkg's USE that should be blocked by another pkg
Summary: sys-apps/portage-2.1.11.31: Omits a package dep on 'emerge -e world'; allows ...
Status: RESOLVED DUPLICATE of bug 350230
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-24 13:12 UTC by Roman Žilka
Modified: 2014-12-28 23:23 UTC (History)
1 user (show)

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


Attachments
(first bug) Output of 'emerge -dep world' (emerge_-dep_world.xz,115.67 KB, application/octet-stream)
2013-01-24 13:17 UTC, Roman Žilka
Details
(second bug) Output of 'emerge -duDN --with-bdeps y world' (emerge_-duDN_--with-bdeps_y_world.xz,106.52 KB, application/octet-stream)
2013-01-24 13:19 UTC, Roman Žilka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Žilka 2013-01-24 13:12:47 UTC
I have dev-libs/libxml2-2.8.0-r3 installed. It's not in world, but:
# equery d dev-libs/libxml2 | wc -l
24

At some point in history I added this line in /etc/portage/package.use, because some package wanted it:
dev-libs/libxml2 python

Now when I remove this line, 'emerge -e world' doesn't want to re-emerge libxml2 (see an attachment for debug output). 'emerge -c', however, doesn't want to remove anything, not even libxml2. When I add the line back into package.use, 'emerge -e world' does include libxml2. Tested with portage-2.1.11.31 + python-2.7.3-r2, portage-2.1.11.31 + python-3.2.3 and portage-2.1.11.48 + python-2.7.3-r2. This is the first bug.

------------------

Let's remove the line from package.use once again. When I now run 'emerge -vuDN --with-bdeps y world', it re-emerges libxml2 to reflect the change from "+python" to "-python". A subsequent 'emerge -vuDN --with-bdeps y world' is empty (see another attachment for debug output). Looks like the aforementioned "some package" that made me put the line in package.use in the first place doesn't need libxml2[python] anymore. Fine. But unexpectedly (and correctly, as for deps resolution):
# emerge -epv world|grep libxml2
[ebuild   R    ] dev-libs/libxml2-2.8.0-r3:2  USE="icu lzma python* readline -debug -doc -examples -ipv6 -static-libs {-test}" 0 kB

The following USE changes are necessary to proceed:
#required by media-libs/mesa-9.0.1, required by x11-base/xorg-server-1.13.1[-minimal], required by x11-drivers/xf86-input-mouse-1.8.1, required by x11-base/xorg-drivers-1.13[input_devices_mouse]
=dev-libs/libxml2-2.8.0-r3 python

This is the second bug. Tested only with portage-2.1.11.31 + python-2.7.3-r2.

Reproducible: Always




# emerge --info portage python
Portage 2.1.11.31 (hardened/linux/amd64, gcc-4.6.3, glibc-2.15-r3, 3.7.0 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.7.0-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Wed, 23 Jan 2013 19:15:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes -mpclmul -mpopcnt -mcx16"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes -mpclmul -mpopcnt -mcx16"
DISTDIR="/tmp/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noinfo parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirror.dkm.cz/pub/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ http://gentoo.wheel.sk/ ftp://gentoo.mirror.dkm.cz/pub/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--compress --compress-level=9"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/boot/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.cz.gentoo.org/gentoo-portage"
USE="X a52 aac acpi aes-ni alsa amd64 avx bash-completion berkdb bluetooth bzip2 cddb cjk cli cracklib crypt cxx dri encode ffmpeg flac fontconfig ftp gdbm geoip gif gnutls gps gzip hardened hddtemp iconv icu idn imap javascript jpeg jpeg2k justify libass lm_sensors lzma lzo matroska mbox mime mms mmx mmxext modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses nls nocd nptl ogg opengl pam pax_kernel pcre pda pdf png postscript quicktime raw readline recode session smp sockets sound spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 svg syslog threads truetype udev unicode urandom usb v4l vdpau videos vim-syntax vorbis wifi x264 xcomposite xosd xscreensaver xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en cs ja" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sys-apps/portage-2.1.11.31 was built with the following:
USE="(ipc) (multilib) -build -doc -epydoc (-pypy2_0) -python2 -python3 (-selinux) -xattr" LINGUAS="-pl"


dev-lang/python-2.7.3-r2 was built with the following:
USE="gdbm (multilib) ncurses readline sqlite ssl threads (wide-unicode) xml -berkdb -build -doc -examples -ipv6 -tk -wininst"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes -mpclmul -mpopcnt -mcx16 -fwrapv"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes -mpclmul -mpopcnt -mcx16 -fwrapv"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed -L."


dev-lang/python-3.2.3 was built with the following:
USE="gdbm (multilib) ncurses readline sqlite ssl threads (wide-unicode) xml -build -doc -examples -ipv6 -tk -wininst"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes -mpclmul -mpopcnt -mcx16 -fwrapv"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -maes -mpclmul -mpopcnt -mcx16 -fwrapv"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed -L."
Comment 1 Roman Žilka 2013-01-24 13:17:44 UTC
Created attachment 336706 [details]
(first bug) Output of 'emerge -dep world'

Taken with portage-2.1.11.31 + python-2.7.3-r2.
Comment 2 Roman Žilka 2013-01-24 13:19:05 UTC
Created attachment 336708 [details]
(second bug) Output of 'emerge -duDN --with-bdeps y world'

Taken with portage-2.1.11.31 + python-2.7.3-r2.
Comment 3 Zac Medico gentoo-dev 2013-01-25 00:50:18 UTC
(In reply to comment #0)
> Now when I remove this line, 'emerge -e world' doesn't want to re-emerge
> libxml2 (see an attachment for debug output).

It can't re-emerge libxml2, since that would break the libxml2[python] DEPEND from mesa-9.0.1.

> 'emerge -c', however, doesn't
> want to remove anything, not even libxml2.

The default for 'emerge -c' is --with-bdeps=y, so it pulls in the libxml2[python] DEPEND from mesa-9.0.1.

> When I add the line back into
> package.use, 'emerge -e world' does include libxml2. Tested with
> portage-2.1.11.31 + python-2.7.3-r2, portage-2.1.11.31 + python-3.2.3 and
> portage-2.1.11.48 + python-2.7.3-r2. This is the first bug.

Now it can re-emerge libxml2, without breaking the libxml2[python] DEPEND from mesa-9.0.1.

> ------------------
> 
> Let's remove the line from package.use once again. When I now run 'emerge
> -vuDN --with-bdeps y world', it re-emerges libxml2 to reflect the change
> from "+python" to "-python". A subsequent 'emerge -vuDN --with-bdeps y
> world' is empty (see another attachment for debug output). Looks like the
> aforementioned "some package" that made me put the line in package.use in
> the first place doesn't need libxml2[python] anymore. Fine.

In this case, it drops the DEPEND from mesa-9.0.1 because it doesn't need to re-emerge mesa-9.0.1 (DEPEND is build-time only).

> But unexpectedly
> (and correctly, as for deps resolution):
> # emerge -epv world|grep libxml2
> [ebuild   R    ] dev-libs/libxml2-2.8.0-r3:2  USE="icu lzma python* readline
> -debug -doc -examples -ipv6 -static-libs {-test}" 0 kB
> 
> The following USE changes are necessary to proceed:
> #required by media-libs/mesa-9.0.1, required by
> x11-base/xorg-server-1.13.1[-minimal], required by
> x11-drivers/xf86-input-mouse-1.8.1, required by
> x11-base/xorg-drivers-1.13[input_devices_mouse]
> =dev-libs/libxml2-2.8.0-r3 python

The -e flag forces re-emerge of mesa-9.0.1, which forces its libxml2[python] DEPEND do be satisfied.

For all of these behaviors, emerge behaves exactly as it is intended to behave.
Comment 4 Zac Medico gentoo-dev 2013-01-25 01:56:26 UTC
(In reply to comment #3)
> > Let's remove the line from package.use once again. When I now run 'emerge
> > -vuDN --with-bdeps y world', it re-emerges libxml2 to reflect the change
> > from "+python" to "-python". A subsequent 'emerge -vuDN --with-bdeps y
> > world' is empty (see another attachment for debug output). Looks like the
> > aforementioned "some package" that made me put the line in package.use in
> > the first place doesn't need libxml2[python] anymore. Fine.
> 
> In this case, it drops the DEPEND from mesa-9.0.1 because it doesn't need to
> re-emerge mesa-9.0.1 (DEPEND is build-time only).

We can make it backtrack in order to avoid dropping the DEPEND. This is similar to bug #427938, which also involves a dropped build-time dependency.
Comment 5 Roman Žilka 2013-01-25 13:18:12 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > Now when I remove this line, 'emerge -e world' doesn't want to re-emerge
> > libxml2 (see an attachment for debug output).
> 
> It can't re-emerge libxml2, since that would break the libxml2[python]
> DEPEND from mesa-9.0.1.

'--emptytree' should assume that no packages are installed. It simply must include libxml2, because mesa and 23 other packages have libxml2 as their (R)DEPEND. That looks like a clear bug to me. I think '--emptytree' should include libxml2 and warn me about the need to add 'libxml2 +python' into package.use for mesa to be happy. And once again - there's the other 23 packages too.

> > 'emerge -c', however, doesn't
> > want to remove anything, not even libxml2.
> 
> The default for 'emerge -c' is --with-bdeps=y, so it pulls in the
> libxml2[python] DEPEND from mesa-9.0.1.

But it doesn't pull it in. I don't know if this is a bug or not, but '--depclean' should probably warn me about a missing 'libxml2 +python' setting, because the current state (i.e., with '-python') has bdeps broken.

> > ------------------

> > Let's remove the line from package.use once again. When I now run 'emerge
> > -vuDN --with-bdeps y world', it re-emerges libxml2 to reflect the change
> > from "+python" to "-python". A subsequent 'emerge -vuDN --with-bdeps y
> > world' is empty (see another attachment for debug output). Looks like the
> > aforementioned "some package" that made me put the line in package.use in
> > the first place doesn't need libxml2[python] anymore. Fine.
> 
> In this case, it drops the DEPEND from mesa-9.0.1 because it doesn't need to
> re-emerge mesa-9.0.1 (DEPEND is build-time only).

Leaving this topic after reading comment #4. '--with-bdeps y' must not behave like '--with-bdeps n'.

> > But unexpectedly
> > (and correctly, as for deps resolution):
> > # emerge -epv world|grep libxml2
> > [ebuild   R    ] dev-libs/libxml2-2.8.0-r3:2  USE="icu lzma python* readline
> > -debug -doc -examples -ipv6 -static-libs {-test}" 0 kB
> > 
> > The following USE changes are necessary to proceed:
> > #required by media-libs/mesa-9.0.1, required by
> > x11-base/xorg-server-1.13.1[-minimal], required by
> > x11-drivers/xf86-input-mouse-1.8.1, required by
> > x11-base/xorg-drivers-1.13[input_devices_mouse]
> > =dev-libs/libxml2-2.8.0-r3 python
> 
> The -e flag forces re-emerge of mesa-9.0.1, which forces its libxml2[python]
> DEPEND do be satisfied.

You seem to be confirming now that the "first bug" really is a bug. See the first few paragraphs of this comment.
Comment 6 Zac Medico gentoo-dev 2013-01-25 15:35:25 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #0)
> > > Now when I remove this line, 'emerge -e world' doesn't want to re-emerge
> > > libxml2 (see an attachment for debug output).
> > 
> > It can't re-emerge libxml2, since that would break the libxml2[python]
> > DEPEND from mesa-9.0.1.
> 
> '--emptytree' should assume that no packages are installed. It simply must
> include libxml2, because mesa and 23 other packages have libxml2 as their
> (R)DEPEND. That looks like a clear bug to me. I think '--emptytree' should
> include libxml2 and warn me about the need to add 'libxml2 +python' into
> package.use for mesa to be happy. And once again - there's the other 23
> packages too.

It's not possible to include libxml2 unless you enable the python flag, since otherwise the mesa-9.0.1 ebuild will have an unsatisfied dependency (and it should fail to build). If we change the behavior, it would be reasonable to have it produce an autounmask message like the one in comment #0, and exit unsuccessfully.

> > > 'emerge -c', however, doesn't
> > > want to remove anything, not even libxml2.
> > 
> > The default for 'emerge -c' is --with-bdeps=y, so it pulls in the
> > libxml2[python] DEPEND from mesa-9.0.1.
> 
> But it doesn't pull it in. I don't know if this is a bug or not, but
> '--depclean' should probably warn me about a missing 'libxml2 +python'
> setting, because the current state (i.e., with '-python') has bdeps broken.

The dependency is not really broken, because DEPEND is build-time only. The fact that it is unsatisfied only means that you cannot re-emerge mesa-9.0.1 unless the dependency is satisfied.
Comment 7 Roman Žilka 2013-01-25 15:54:03 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #3)
> > > (In reply to comment #0)
> > > > Now when I remove this line, 'emerge -e world' doesn't want to re-emerge
> > > > libxml2 (see an attachment for debug output).
> > > 
> > > It can't re-emerge libxml2, since that would break the libxml2[python]
> > > DEPEND from mesa-9.0.1.
> > 
> > '--emptytree' should assume that no packages are installed. It simply must
> > include libxml2, because mesa and 23 other packages have libxml2 as their
> > (R)DEPEND. That looks like a clear bug to me. I think '--emptytree' should
> > include libxml2 and warn me about the need to add 'libxml2 +python' into
> > package.use for mesa to be happy. And once again - there's the other 23
> > packages too.
> 
> It's not possible to include libxml2 unless you enable the python flag,
> since otherwise the mesa-9.0.1 ebuild will have an unsatisfied dependency
> (and it should fail to build). If we change the behavior, it would be
> reasonable to have it produce an autounmask message like the one in comment
> #0, and exit unsuccessfully.

Yes, the autounmask message would be desirable. Else, complete failure with an errormessage is in order, I think. In the current design, the same reason as you just described makes the behavior weird: emerge wants to merge mesa and 23 other packages, but doesn't want to first merge their dependency.

Without the autounmask message / failure + error message, the merge operation is destined to fail anyway.

> > > > 'emerge -c', however, doesn't
> > > > want to remove anything, not even libxml2.
> > > 
> > > The default for 'emerge -c' is --with-bdeps=y, so it pulls in the
> > > libxml2[python] DEPEND from mesa-9.0.1.
> > 
> > But it doesn't pull it in. I don't know if this is a bug or not, but
> > '--depclean' should probably warn me about a missing 'libxml2 +python'
> > setting, because the current state (i.e., with '-python') has bdeps broken.
> 
> The dependency is not really broken, because DEPEND is build-time only. The
> fact that it is unsatisfied only means that you cannot re-emerge mesa-9.0.1
> unless the dependency is satisfied.

Yes, but 'emerge --depclean' should honor even build-time-only deps. Because it has '--with-bdeps y' by default. Because of that, the state with '-python' has broken deps. Build-time deps, but that should be honored too here.
Comment 8 Zac Medico gentoo-dev 2014-12-28 23:23:39 UTC

*** This bug has been marked as a duplicate of bug 350230 ***