Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 384899

Summary: "emerge --autounmask=no" shows only mask errors and no use errors
Product: Portage Development Reporter: Morse <radist.morse>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: esigra
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 300071    

Description Morse 2011-09-29 09:44:28 UTC
I tried this command:

~$ emerge -uDNvf --autounmask=n --keep-going world

These are the packages that would be fetched, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy ">=dev-util/kbuild-0.1.999" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-util/kbuild-9999::gentoo (masked by: missing keyword)
- dev-util/kbuild-0.1.9998_pre20110817::gentoo (masked by: ~x86 keyword)

(dependency required by "app-emulation/virtualbox-4.1.2" [ebuild])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.



It shows some crap about masked packages, when the real reason it failed is:

~$ emerge -f firefox springlobby
Calculating dependencies... done!
[ebuild   R    ] x11-base/xorg-server-1.10.4  USE="xvfb*" 
[ebuild  N     ] x11-apps/xhost-1.0.4  USE="ipv6" 
[ebuild     U ~] games-util/springlobby-0.139 [0.133]
[ebuild     U ~] www-client/firefox-7.0 [6.0.2] USE="pgo*" 

The following USE changes are necessary to proceed:
#required by www-client/firefox-7.0[pgo], required by firefox (argument)
=x11-base/xorg-server-1.10.4 xvfb

NOTE: This --autounmask behavior can be disabled by setting
      EMERGE_DEFAULT_OPTS="--autounmask=n" in make.conf.

Reproducible: Always

Steps to Reproduce:
1. Get both masking AND use issues in your "world" set
2. emerge --autounmask=n world
Actual Results:  
You see the masking issue as a supposed blocker

Expected Results:  
When the actual blocker is a use issue

Portage 2.1.10.11 (default/linux/x86/10.0/desktop/gnome, gcc-4.5.3, glibc-2.12.2-r0, 3.0.4-gentoo i686)
=================================================================
System uname: Linux-3.0.4-gentoo-i686-Intel-R-_Core-TM-2_CPU_T5600_@_1.83GHz-with-gentoo-2.0.3
Timestamp of tree: Wed, 28 Sep 2011 14:30:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5, 4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo spring funroll-loops gamerlay-stable mozilla
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula googleearth AdobeFlash-10.1 Oracle-BCLA-JavaSE"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ ftp://mirror.yandex.ru/gentoo-distfiles/"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/Spring /var/lib/layman/funroll-loops /var/lib/layman/gamerlay /var/lib/layman/mozilla"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa automount berkdb branding bzip2 cairo cdda cdr cdrtools cli consolekit cracklib crypt cue cups cvs cxx dbus dhcp djvu dri dts dvd dvdr eds emboss encode eselect evo exif ext2 ext3 fam fat fbcon fbcondecor ffmpeg firefox flac fontconfig fortran ftp fuse gconf gdbm gdu gif glitz gnome gnome-keyring gnutls gphoto2 gpm graphite gstreamer gtk iconv ieee1394 ieee1395 iptc ipv6 java java6 jpeg jpeg2k lame laptop latex lcms ldap libcaca libnotify lto lzo mad mikmod mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap musicbrainz nautilus ncurses networkmanager nfs nls nptl nptlonly nsplugin ntfs ogg openal opengl openmp pam pango pcmcia pcre pdf perl png policykit ppds pppd python qt3support qt4 readline samba sasl sdl session sha smb smp spell sqlite sse sse2 sse3 ssl ssse3 startup-notification subtitles subversion svg sysfs syslog tcpd theora threads tiff totem trayicon truetype udev unicode usb utf8 v4l v4l2 vorbis wifi wxwidgets wxwindows x264 x86 xcb xcomposite xfs xinerama xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="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 stage tables krita karbon braindump" CAMERAS="canon" 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" LINGUAS="ru en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sebastian Luther (few) 2011-09-29 10:34:17 UTC
(In reply to comment #0)
> I tried this command:
> 
> ~$ emerge -uDNvf --autounmask=n --keep-going world
> 
> These are the packages that would be fetched, in order:
> 
> Calculating dependencies... done!
> 
> !!! All ebuilds that could satisfy ">=dev-util/kbuild-0.1.999" have been
> masked.
> !!! One of the following masked packages is required to complete your request:
> - dev-util/kbuild-9999::gentoo (masked by: missing keyword)
> - dev-util/kbuild-0.1.9998_pre20110817::gentoo (masked by: ~x86 keyword)
> 
> (dependency required by "app-emulation/virtualbox-4.1.2" [ebuild])
> (dependency required by "@selected" [set])
> (dependency required by "@world" [argument])
> For more information, see the MASKED PACKAGES section in the emerge
> man page or refer to the Gentoo Handbook.
> 
> 

A masked dependency seems to be a valid thing to complain about.

> 
> It shows some crap about masked packages, when the real reason it failed is:
> 
> ~$ emerge -f firefox springlobby

What's the output of 'emerge -uDNvf --autounmask=y --keep-going world'? Does ommiting -f make a difference in any of the two cases?
Comment 2 Morse 2011-09-29 11:38:00 UTC
> Does ommiting -f make a difference in any of the two cases?

No. Both -p or -f makes no difference at all.

Here are four cases that really are different:

~$ emerge -uDNv world

These are the packages that would be merged, in order:

Calculating dependencies  . ...... ... done!
<LIST OF PACKAGES HERE>

Total: 54 packages (44 upgrades, 1 downgrade, 3 new, 6 reinstalls), Size of downloads: 82,798 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /var/lib/layman/Spring
 [2] /var/lib/layman/mozilla

The following keyword changes are necessary to proceed:
#required by app-emulation/virtualbox-4.1.2, required by app-emulation/virtualbox-extpack-oracle-4.1.2
=dev-util/kbuild-0.1.9998_pre20110817 ~x86

The following USE changes are necessary to proceed:
#required by www-client/firefox-7.0[pgo], required by @selected, required by @world (argument)
=x11-base/xorg-server-1.10.4 xvfb

NOTE: This --autounmask behavior can be disabled by setting
      EMERGE_DEFAULT_OPTS="--autounmask=n" in make.conf.

Use --autounmask-write to write changes to config files (honoring CONFIG_PROTECT).



~$ emerge -uDNv --autounmask=n world

These are the packages that would be merged, in order:

Calculating dependencies  . ........ done!

!!! All ebuilds that could satisfy ">=dev-util/kbuild-0.1.999" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-util/kbuild-9999::gentoo (masked by: missing keyword)
- dev-util/kbuild-0.1.9998_pre20110817::gentoo (masked by: ~x86 keyword)

(dependency required by "app-emulation/virtualbox-4.1.2" [ebuild])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.



~$ emerge -uDNv firefox

These are the packages that would be merged, in order:

Calculating dependencies  ..... done!
<unrelated packages removed>
[ebuild   R    ] x11-base/xorg-server-1.10.4  USE="ipv6 kdrive nptl udev xorg xvfb* -dmx -doc -minimal -static-libs -tslib -xnest" 0 kB [0]
[ebuild     U ~] www-client/firefox-7.0 [6.0.2] USE="alsa crashreporter dbus ipc libnotify pgo* startup-notification webm wifi -bindist -custom-cflags -custom-optimization -debug -system-sqlite" LINGUAS="en ru -af -ak -ar -ast -be -bg -bn -bn_BD -bn_IN -br -bs -ca -cs -cy -da -de -el -en_GB -en_US -en_ZA -eo -es -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy -fy_NL -ga -ga_IE -gd -gl -gu -gu_IN -he -hi -hi_IN -hr -hu -hy -hy_AM -id -is -it -ja -kk -kn -ko -ku -lg -lt -lv -mai -mk -ml -mr -nb -nb_NO -nl -nn -nn_NO -nso -or -pa -pa_IN -pl -pt -pt_BR -pt_PT -rm -ro -si -sk -sl -son -sq -sr -sv -sv_SE -ta -ta_LK -te -th -tr -uk -vi -zh -zh_CN -zh_TW -zu" 0 kB [1]

Total: 7 packages (2 upgrades, 1 new, 4 reinstalls), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /var/lib/layman/mozilla

The following USE changes are necessary to proceed:
#required by www-client/firefox-7.0[pgo], required by firefox (argument)
=x11-base/xorg-server-1.10.4 xvfb

NOTE: This --autounmask behavior can be disabled by setting
      EMERGE_DEFAULT_OPTS="--autounmask=n" in make.conf.

Use --autounmask-write to write changes to config files (honoring CONFIG_PROTECT).



~$ emerge -uDNv --autounmask=n firefox

These are the packages that would be merged, in order:

Calculating dependencies  ... done!

emerge: there are no ebuilds built with USE flags to satisfy "x11-base/xorg-server[xvfb]".
!!! One of the following packages is required to complete your request:
- x11-base/xorg-server-1.10.4::gentoo (Change USE: +xvfb)
(dependency required by "www-client/firefox-7.0[pgo]" [ebuild])
(dependency required by "firefox" [argument])


In all four cases the actual merging didn't start.
Naturally, the error case is "emerge -uDNv --autounmask=n world", where emerge should show both mask AND use problems, but shows only mask.
After adding the missing use flag to package.use, "emerge -uDNv --autounmask=no world" showed the error message AND started
Comment 3 Sebastian Luther (few) 2011-09-29 11:52:25 UTC
I'd say this is a WONTFIX. The reason why --autounmask was introduced is exactly this short coming of --autounmask=n. 

Are there circumstances for you where --autounmask=y isn't a proper replacement for --autounmask=y?
Comment 4 Sebastian Luther (few) 2011-09-29 11:53:09 UTC
(In reply to comment #3)
> Are there circumstances for you where --autounmask=y isn't a proper replacement
> for --autounmask=y?

Read this instead:
> Are there circumstances for you where --autounmask=y isn't a proper replacement
> for --autounmask=n?
Comment 5 Morse 2011-09-29 12:52:32 UTC
Look at it from the user's point of view. He starts "emerge -uDNv --autounmask=n world", and it doesn't start with some masking problem. He tries hard to solve it, and eventually solves, only to find out that it wasn't the actual cause why merging didn't start.

It is double-confusing, since I usually provide --autounmask=n especially to not bother with masking problems.
Comment 6 Sebastian Luther (few) 2011-09-29 14:39:17 UTC
(In reply to comment #5)
> It is double-confusing, since I usually provide --autounmask=n especially to
> not bother with masking problems.

I agree it is confusing and the fix for this issue is --autounmask=y. 
You might be interested in the --autounmask-keep-masks option added in bug 372485. I think it's not in a released version though.