Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27738 - qpkg -q doesn't take USE flags into account
Summary: qpkg -q doesn't take USE flags into account
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
: 51067 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-01 15:54 UTC by G.K.MacGregor
Modified: 2004-08-21 12:56 UTC (History)
4 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 G.K.MacGregor 2003-09-01 15:54:06 UTC
The -q option (which lists packages that depend on the specified package) does not 
take the USE flags into account. When an ebuild's dependencies change depending on 
a USE flag, it seems to act as if the USE flag in question is enabled. 
 
For example, in many cases "esound" is often a dependency of some packages if the 
"esd" flag is set (in other words the ebuild has a line like esd? (>= 
media-sound/esound-0.2.22), the xmms and xmame ebuilds are examples of this. qpkg 
will always say that xmms and xmame depend on esound, regardless of whether the 
"esd" USE flag is set or not. 

Reproducible: Always
Steps to Reproduce:
USE="-esd" qpkg -q esound-0.2.29 
Actual Results:  
media-sound/esound-0.2.29 * 
DEPENDED ON BY: 
        app-emulation/xmame-0.72.1 
        media-sound/xmms-1.2.7-r20 
 
(there are more ebuilds it reports such as xine-lib) 

Expected Results:  
qpkg should not report that xmame and xmms depend on esound if the "esd" USE flag 
is not set. Only if the "esd" USE flag is set should this happen.
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2003-10-03 22:54:31 UTC
If qpkg were to take into account the USE flags, setting USE in the environment
wouldn't affect the output. It should look at /var/db/pkg/pkg-cat/pkgname/USE.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2004-04-03 10:38:04 UTC
It still does not take /var/db/pkg/pkg-cat/pkgname/USE into consideration.
qpkg -q -I arts     (this should make it only show me the installed progs I've got)
kde-base/arts-1.2.1 * 
DEPENDED ON BY: 
        media-libs/libao-0.8.5
        media-libs/libsdl-1.2.7
        media-video/mplayer-1.0_pre3-r5 

I verified that I had -arts in USE="" in /etc/make.conf. And then verified that arts did not show up in emerge info.
emerge info
Portage 2.0.50-r2 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.4-gentoo-r1)
=================================================================
System uname: 2.6.4-gentoo-r1 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.40GHz
Gentoo Base System version 1.4.3.13p1
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer -fexpensive-optimizations -ffast-math -falign-functions=4 -fforce-addr -funroll-loops -maccumulate-outgoing-args -frerun-loop-opt -fprefetch-loop-arrays -frerun-cse-after-loop -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer -fexpensive-optimizations -ffast-math -falign-functions=4 -fforce-addr -funroll-loops -maccumulate-outgoing-args -frerun-loop-opt -fprefetch-loop-arrays -frerun-cse-after-loop -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync2.us.gentoo.org/gentoo-portage"
USE="X alsa apm avi berkdb cdr crypt cups dvd encode esd foomaticdb footmaticdb gdbm gif gnome gnomedb gphoto2 gpm gstreamer gtk gtk2 imlib ipv6 java jpeg libg++ libwww mad mikmod motif mozilla moznocompose moznoirc moznomail mozsvg mpeg mysql ncurses nogcj nptl oav oggvorbis opengl oss pam pcmcia pdflib perl pic png pnp ppds python qt quicktime readline samba sdl slang slp smooth spell sse ssl svga tcltk tcpd tiff truetype usb wmf x86 xml2 xmms xv zlib"

re-emerged all 3 packages. And ran qpkg -q -I arts again. And the same depends showed up.

So I did the following....
cat /var/db/pkg/media-libs/libao-0.8.5/USE
X alsa apm avi berkdb cdr crypt cups dvd encode esd foomaticdb footmaticdb gdbm gif gnome gnomedb gphoto2 gpm gstreamer gtk gtk2 imlib ipv6 java jpeg libg++ libwww mad mikmod motif mozilla moznocompose moznoirc moznomail mozsvg mpeg mysql ncurses nogcj nptl oav oggvorbis opengl oss pam pcmcia pdflib perl pic png pnp ppds python qt quicktime readline samba sdl slang slp smooth spell sse ssl svga tcltk tcpd tiff truetype usb wmf x86 xml2 xmms xv zlib

There's no arts in there. As far as I'm concerned the package did not build using arts. Now either there's a bug with this tool, or there is something wrong with use_enable.

Upon unmerging arts. qpkg -q -I arts displayed nothing.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2004-05-14 09:58:43 UTC
*** Bug 51067 has been marked as a duplicate of this bug. ***
Comment 4 David Brigada 2004-06-14 20:11:56 UTC
I can confirm this bug.  I originally had some qt applications and doxygen emerged (because of USE="qt" being in the system's make.defaults), correctly pulling in qt.  When I explicitly added USE="-qt" in /etc/make.conf and re-emerged doxygen, qpkg qt -I -q -vv outputted incorrectly that doxygen depended on qt.  Once I removed the other qt applications, qpkg qt -I -q -vv still replied that doxygen required qt.  Upon emerge depclean, qt was correctly unmerged.  At this time, running qpkg qt -q -vv again (and searching for the correct version) still replied that doxygen required qt.

equery depgraph doxygen also suffered from this bug until emerge depclean, at which point it removed qt from the depgraph.
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2004-08-21 12:56:16 UTC
The -q option is broken by design, also qpkg is deprecated.