Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388267 - propagation of USE flags to virtuals
Summary: propagation of USE flags to virtuals
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Conceptual/Abstract Ideas (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: autouse 365127
Blocks:
  Show dependency tree
 
Reported: 2011-10-23 20:17 UTC by ta2002
Modified: 2011-10-26 03:35 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 ta2002 2011-10-23 20:17:39 UTC
This is probably is duplicate of something, but I searched and couldn't find anything.

I have a stable system (including sys-apps/portage-2.1.10.11), and want to enable the vdpau USE flag.

In combination with regular upgrades, this produced:

Reproducible: Always

Steps to Reproduce:
# emerge -Dpuv world

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

Calculating dependencies... done!

[...]

[ebuild     U  ] media-video/ffmpeg-0.7.6 [0.7.5] USE="X aac alsa bzip2 encode hardcoded-tables mmx mmxext mp3 network rtmp sdl speex ssse3 theora threads truetype v4l2 vorbis xvid zlib -3dnow -3dnowext (-altivec) -amr -avx -bindist (-celt) -cpudetection -custom-cflags -debug -dirac -doc -faac -frei0r -gsm -ieee1394 -jack -jpeg2k -oss -pic -qt-faststart -schroedinger -static-libs -test -v4l -vaapi -vdpau -vpx -x264" VIDEO_CARDS="nvidia" 4,423 kB

[...]

The following USE changes are necessary to proceed:
#required by virtual/ffmpeg-0.6.90, required by ...
=media-video/ffmpeg-0.7.6 -vdpau

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

So the current installation of virtual/ffmpeg-0.6.90 (with -vdpau) is BLOCKING compilation of media-video/ffmpeg-0.7.6 with the vdpau USE flag enabled.

This seems horribly wrong to me.

In fact, if I try to do a fetch, portage wants to WRITE the changes to the config files:

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

The most maddening thing (an inconsistency) is that simply trying to emerge media-video/ffmpeg-0.7.6 by itself will work (but won't fix virtual/ffmpeg-0.6.90):

# emerge -pv ffmpeg

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

Calculating dependencies... done!
[ebuild     U  ] media-video/ffmpeg-0.7.6 [0.7.5] USE="X aac alsa bzip2 encode hardcoded-tables mmx mmxext mp3 network rtmp sdl speex ssse3 theora threads truetype v4l2 vdpau* vorbis xvid zlib -3dnow -3dnowext (-altivec) -amr -avx -bindist (-celt) -cpudetection -custom-cflags -debug -dirac -doc -faac -frei0r -gsm -ieee1394 -jack -jpeg2k -oss -pic -qt-faststart -schroedinger -static-libs -test -v4l -vaapi -vpx -x264" VIDEO_CARDS="nvidia" 4,423 kB                                                                                           

Total: 1 package (1 upgrade), Size of downloads: 4,423 kB

Emerging the virtual package by itself (the eventual workaround) does what I would expect - force a re-emerge of the actual package:

# emerge -pv virtual/ffmpeg

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

Calculating dependencies... done!
[ebuild     U  ] media-video/ffmpeg-0.7.6 [0.7.5] USE="X aac alsa bzip2 encode hardcoded-tables mmx mmxext mp3 network rtmp sdl speex ssse3 theora threads truetype v4l2 vdpau* vorbis xvid zlib -3dnow -3dnowext (-altivec) -amr -avx -bindist (-celt) -cpudetection -custom-cflags -debug -dirac -doc -faac -frei0r -gsm -ieee1394 -jack -jpeg2k -oss -pic -qt-faststart -schroedinger -static-libs -test -v4l -vaapi -vpx -x264" VIDEO_CARDS="nvidia" 4,423 kB                                                                                           
[ebuild   R    ] virtual/ffmpeg-0.6.90  USE="X encode mp3 sdl theora threads vdpau* -jpeg2k -vaapi -x264" 0 kB

Total: 2 packages (1 upgrade, 1 reinstall), Size of downloads: 4,423 kB


Expected Results:  
I believe that emerge -Du world should force a reinstall of the virtual package with the correct USE flags - not block the underlying package, or force the user to change the desired USE flags.

# emerge -p --info
Portage 2.1.10.11 (default/linux/amd64/10.0/no-multilib, gcc-4.5.3, glibc-2.12.2-r0, 2.6.39-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-Intel-R-_Core-TM-2_CPU_6300_@_1.86GHz-with-gentoo-2.0.3
Timestamp of tree: Sun, 23 Oct 2011 06:00: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.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            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.39 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit R X a52 aac aalib accessibility acpi additions alsa amd64 aspell ass audio audiofile berkdb bookmarks bwscheduler bzip2 cairo caps cdio cdr chm client consolekit cracklib crypt css cups cxx dbus device-mapper dga directfb djvu downloadorder dri dvd dvdnav dvdr ebook encode exceptions exif expat fam fbcon ffmpeg flac fontconfig fortran gcj gecko ggi gif glib glibc-omitfp gmp gphoto2 gpm gstreamer gtk handbook hardcoded-tables hddtemp holidays hpn iconv idea imap infowidget iostats ipc ipfilter ipv6 jabber javascript jbig jit joystick jpeg kde lcms less libkms libwww live llvm lm_sensors logviewer lzma mad matroska mbox mdns-bundled memlimit midi mmx mmxext mp3 mpeg mta mudflap nas ncurses net netapi network nls no-old-linux nodrm nptl nptlonly ntp ocamlopt offlinehelp ofx ogg opengl openmedia openmp oscar osdmenu pcre pdf perl pm-utils png policykit portmon ps qt3support quotes raptor readline recursion-limit redland rss rtc rtmp scanfolder scanner sdl search secure-delete sensord server shared-glapi shm silc smbclient smtp sndfile sound speex spell sse sse2 ssl ssse3 stats subversion svg sysfs tcpd theora threads threadsafe tiff tremor truetype udev unicode upnp urandom usb userlocales utils v4l2 vdpau video vorbis wav webdav-neon webinterface win64 wps xcb xinerama xml xorg xpdf-headers xv xvid yahoo zlib zrtp" 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="evdev" KERNEL="linux" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="epson2" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sebastian Luther (few) 2011-10-24 11:21:59 UTC
virtuals are just ebuilds that happen to be in the virtuals category (there are even virtuals which are not in this category). How do you propose to solve this problem?
Comment 2 ta2002 2011-10-24 11:42:30 UTC
(In reply to comment #1)
> virtuals are just ebuilds that happen to be in the virtuals category (there are
> even virtuals which are not in this category). How do you propose to solve this
> problem?

I am not sure I really understand why it is a problem. In the emerge, media-video/ffmpeg was scheduled to be upgraded from 0.7.5 to 0.7.6. Yet somewhere in the logic of checking things, portage discovered that virtual/ffmpeg was installed with -vdpau. As a solution to this, portage wanted to remove the vdpau use flag from media-video/ffmpeg. I believe that when such a situation is discovered, portage should reinstall virtual/ffmpeg with the desired flag (vdpau in this case) enabled.

I know portage can do this, because I see it all the time (I want to emerge some new package foo, and portage, for example, forces a re-emerge of python with the sqlite flag enabled). It's just a question of getting the logic correct.
Comment 3 Sebastian Luther (few) 2011-10-24 11:55:40 UTC
I guess you want what is asked for in bug 258371 then.
Comment 4 ta2002 2011-10-26 03:35:36 UTC
(In reply to comment #3)
> I guess you want what is asked for in bug 258371 then.

Not really.

The question in this instance is HOW to resolve virtual/ffmpeg -vdpau and media-video/ffmpeg +vdpau once portage recognizes the conflict. Portage wants to change the vdpau flag to "-" in media-video/ffmpeg when merging it. I believe that portage should attempt to re-emerge packages (virtual/ffmpeg) to match the vdpau use flag with what the user has requested ("+").

I guess what happens depends on the order in which portage encounters that packages. I assume that portage does not do "reverse" dependency checking (which could include use flags). The logic to do that seems fairly straightforward, though such searches (based on my experience with equery) can become quite time consuming (possibly not something that portage should have enabled by default).