Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407289 - emerge --autounmask does not attempt to solve unsatisfied REQUIRED_USE
Summary: emerge --autounmask does not attempt to solve unsatisfied REQUIRED_USE
Status: RESOLVED DUPLICATE of bug 403207
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-07 14:57 UTC by Till Schäfer
Modified: 2012-04-06 16:07 UTC (History)
2 users (show)

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 Till Schäfer 2012-03-07 14:57:17 UTC
When trying to unmask a package that has a unsatisfied use flag dependency the error message does not make clear what is going on.

Example: Trying too install mesa 8

# emerge -av1 =media-libs/mesa-8.0.1-r2

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

Calculating dependencies \

!!! Problem resolving dependencies for =media-libs/mesa-8.0.1-r2
... done!

!!! All ebuilds that could satisfy "=media-libs/mesa-8.0.1-r2" have been masked.
!!! One of the following masked packages is required to complete your request:
- media-libs/mesa-8.0.1-r2::gentoo (masked by: ~amd64 keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

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

this is not leading to the real mistake wich is: 


# echo "=media-libs/mesa-8.0.1-r2" >> /etc/portage/package.accept_keywords/portage

# emerge -av1 =media-libs/mesa-8.0.1-r2

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

Calculating dependencies \

!!! Problem resolving dependencies for =media-libs/mesa-8.0.1-r2
... done!

!!! The ebuild selected to satisfy "=media-libs/mesa-8.0.1-r2" has unmet requirements.
- media-libs/mesa-8.0.1-r2::gentoo USE="classic (consolekit) egl gallium llvm (multilib) nptl (policykit) shared-glapi xvmc -bindist -d3d -debug -g3dvl -gbm -gles1 -gles2 -openvg -osmesa -pax_kernel -pic (-selinux) -shared-dricore -vdpau -wayland" VIDEO_CARDS="intel -i915 -i965 -nouveau -r100 -r200 -r300 -r600 -radeon -vmware"

  The following REQUIRED_USE flag constraints are unsatisfied:
    xvmc? ( g3dvl )

  The above constraints are a subset of the following complete expression:
    d3d? ( gallium ) g3dvl? ( gallium ) llvm? ( gallium ) openvg? ( egl gallium ) gbm? ( shared-glapi ) g3dvl? ( any-of ( vdpau xvmc ) ) vdpau? ( g3dvl ) xvmc? ( g3dvl ) video_cards_intel? ( any-of ( classic gallium ) ) video_cards_i915? ( any-of ( classic gallium ) ) video_cards_i965? ( classic ) video_cards_nouveau? ( any-of ( classic gallium ) ) video_cards_radeon? ( any-of ( classic gallium ) ) video_cards_r100? ( classic ) video_cards_r200? ( classic ) video_cards_r300? ( gallium ) video_cards_r600? ( gallium ) video_cards_vmware? ( gallium )

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


so in fact a use flag is required. 
A second question that raises: why autounmask does not resolve that use dependency




Reproducible: Always




# emerge --info
Portage 2.2.0_alpha90 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 3.2.5-gentoo x86_64)
=================================================================
System uname: Linux-3.2.5-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Wed, 07 Mar 2012 14:00:01 +0000
ccache version 3.1.6 [disabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            3.3.6-r1, 4.1.2, 4.4.6-r1, 4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo x11 hwoarang local_overlay
Installed sets: @kdeartwork-4.8, @kdebase-4.8, @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /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/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --autounmask-write --jobs --load-average=5.0"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11 /var/lib/layman/hwoarang /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdaudio cdda cddb cdio cdr cli consolekit cracklib crypt css cups cxx dbus declarative dell dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gdu gif glib glibc gpm gtk haskell iconv icu id3tag ieee1394 imagemagick inotify ipv4 ipv6 irc java jpeg jpeg2k kde kipi lame latex lcms ldap libnotify lzma mad mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses nls nptl nptlonly ntp ogg opengl openmp otr pam pango pcre pdf phonon plasma pm-utils png policykit ppds pppd qt3support qt4 quicktime rar readline rss sdl semantic-desktop session spell sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg sysfs syslog taglib tcpd threads tiff truetype udev unicode usb v41 v412 vaapi vcd vim-syntax visualization vorbis wavpack wifi wma wmf x264 xcb xcomposite xine xinerama xml xorg xscreensaver xulrunner xv xvid xvmc 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="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="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="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Johannes Rauh 2012-03-07 16:34:00 UTC
I had the same problem with libreoffice.  There the issue is a bit more subtle, because the use requirement is:

  The following REQUIRED_USE flag constraints are unsatisfied:
    kde? ( !gnome ) gnome? ( !kde )

In other words, portage cannot always resolve the issue.  It should, however, be able to solve the simple issues, and, more importantly, it should give a meaningful error message.
Comment 2 Zac Medico gentoo-dev 2012-03-07 16:43:32 UTC
(In reply to comment #1)
> It should, however, be able to solve the simple issues,

Yes, that would be a nice enhancement.

> and, more importantly, it should give a meaningful error message.

It attempts to do this by separating the part of the REQUIRED_USE expression that is unsatisfied, and displaying it separately. For example, in comment #0 the REQUIRED_USE message shows that "xvmc? ( g3dvl )" is unsatisfied, which is just a small part of the complete expression.
Comment 3 Johannes Rauh 2012-03-07 17:16:57 UTC
(In reply to comment #2)
> > and, more importantly, it should give a meaningful error message.
> 
> It attempts to do this by separating the part of the REQUIRED_USE expression
> that is unsatisfied, and displaying it separately. For example, in comment
> #0 the REQUIRED_USE message shows that "xvmc? ( g3dvl )" is unsatisfied,
> which is just a small part of the complete expression.

Yes, I agree that that's a useful feature.  What I meant, however, was that the first error message, before unmasking the ebuild manually, should explain the problem properly.  The first error message just tells the user that a keyword is missing.  This is confusing if the --autounmask --autounmask-write options are used, since in this case a missing keyword should be be added automatically.
Comment 4 Zac Medico gentoo-dev 2012-03-07 17:27:14 UTC
(In reply to comment #3)
> The first error message just tells the user that a keyword is missing.

That's just a symptom of the fact that --autounmask currently makes no attempt to satisfy REQUIRED_USE. After we have enhanced it to satisfy REQUIRED_USE, it will satisfy it together with the keyword mask in a single step.
Comment 5 Pacho Ramos gentoo-dev 2012-04-06 16:03:44 UTC
This looks similar to bug 403207
Comment 6 Zac Medico gentoo-dev 2012-04-06 16:07:03 UTC

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