Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 325441 - app-portage/portage-utils: qdepends: doesn't find USE reverse deps correctly
Summary: app-portage/portage-utils: qdepends: doesn't find USE reverse deps correctly
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
: 361905 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-25 04:02 UTC by devsk
Modified: 2013-09-29 10:35 UTC (History)
7 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 devsk 2010-06-25 04:02:54 UTC
# equery depends paramiko
 * These packages depend on paramiko:
dev-vcs/bzr-2.1.2 (sftp ? dev-python/paramiko)

# q depends -Q paramiko
#

Nothing is returned. sftp is defined in USE.
Comment 1 Wormo (RETIRED) gentoo-dev 2010-06-27 06:58:48 UTC
Please post your 'emerge --info', and also the version of portage-utils you're using.
Comment 2 devsk 2010-06-27 07:10:45 UTC
Using app-portage/portage-utils-0.4

# emerge --info
Portage 2.2_rc67 (default/linux/amd64/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r0, 2.6.34 x86_64)
=================================================================
System uname: Linux-2.6.34-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 26 Jun 2010 00:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.2.4-r1, 4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula AdobeFlash-10 AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -msse2 -msse3 -msse -msse4.1 -msse4.2 -fforce-addr -fomit-frame-pointer -pipe -ftracer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/hibernate /etc/udev/rules.d /etc/vmware /usr/share/X11/xkb /usr/share/config /usr/share/hddtemp /var/bind"
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=native -msse2 -msse3 -msse -msse4.1 -msse4.2 -fforce-addr -fomit-frame-pointer -pipe -ftracer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --keep-going --jobs=12 --load-average=25"
FEATURES="assume-digests collision-protect distlocks fixpackages news nodoc parallel parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="/amd-pc-share/distfiles2/ ftp://mirrors.tds.net/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.llarian.net/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.llarian.net/ http://mirror.espri.arizona.edu/gentoo/"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j12 -l25"
PKGDIR="/private/bin-packages/x64"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/lost+found"
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="/usr/portage/local/layman/mozilla /private/portage/overlay"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi aim aio alsa amd64 audiofile avahi bash-completion berkdb binary-drivers bittorrent bluetooth branding bzip2 cairo cdda cdparanoia cdr chm cleartype cli composite consolekit cracklib crypt cscope css cups curl cvs cxx dar64 dbus dga directfb divx djbfft djvu dmraid dri dts dv dvd dvdnav dvdr dvdread ebook emboss emerald encode erandom evo exif expat faac faad fam fame fbcon fbsplash ffmpeg flac freetype fuse gb gd gif gimp gimpprint glitz glut gmail gnome gnutls gphoto2gtk gpm gtk gtk+ gtk2 hal hddtemp history hpn iconv id3tag ieee1394 imagemagick imap imlib ipod jack java javascript jikes jingle jpeg jpeg2k kde kdehiddenvisibility kqemu kvm lame lcms ldap libcaca libnotify libsamplerate lightning lirc live lm_sensors logitech-mouse logrotate lvm lzo lzw lzw-tiff mad matroska md md5sum mdnsresponder-compat mikmod mjpeg mmap mmx mmx2 mmxext mng modules moznopango mozsvg mp2 mp3 mp4 mpeg mplayer msn mudflap multilib multislot musicbrainz mysql nautilus ncurses nepomuk networkmanager nfs nocd nodot nodrm nomalloccheck nopie nossp nptl nptlonly nsplugin ntfs nut nvidia ogg openexr opengl openmp oss pam pango parted pcre pda pdf perl phyp pic plotutils png pop ppds pppd pulseaudio pvr pwdb python qt qt3support qt4 quicktime radeon radio rar rdesktop readline realmedia reflection rplay rtc samba sasl sdl semantic-desktop sensord server session slp smp sndfile spell spl sqlite sse sse2 sse3 ssl startup-notification stencil-buffer strokesvg svg swat sysfs syslog tcl tcpd theora tiff tk truetype twolame udev urandom usb userlocales v41 v4l v4l2 vde vdpau vim vnc vorbis wma wmf wmp x264 xanim xcb xcomposite xft xine xml xml2 xmms xorg xpm xprint xulrunner xv xvid xvmc yv12 zeroconf zlib" ALSA_CARDS="hda-intel intel8x0 intel8x0m ens1371 emu10k1x" 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 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" CAMERAS="canon panasonic kodak minolta konica" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="hauppauge" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nv fbdev vesa vga nouveau" 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, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 3 devsk 2010-06-27 07:16:47 UTC
# emerge -pv bzr

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

Calculating dependencies... done!
[ebuild   R   ] dev-vcs/bzr-2.1.2  USE="bash-completion curl sftp -doc -emacs -test" 0 kB

Strange! sftp is not defined in package.use, not in make.conf but its in USE. USE env var is not defined globally if that's what you are thinking. Where the heck the sftp is coming from?
Comment 4 Wormo (RETIRED) gentoo-dev 2010-06-28 00:41:26 UTC
The 'sftp' is being enabled by default in the bzr ebuild itself:

IUSE="curl doc emacs +sftp test

So that's no worry.

I'll go ahead and assign this to the portage-utils maintainers since you've now provided enough info for them to get started :)
Comment 5 devsk 2010-06-28 01:36:09 UTC
Ahh...I should have looked at the ebuild...:-) Ok, cool.
Comment 6 solar (RETIRED) gentoo-dev 2010-06-28 02:10:13 UTC
I'm not exactly sure what bug you are encountering here but. I think it may be a misunderstanding on how you think qdepends works. 
qdepends does a simple regex on the installed files in /var/db/pkg and in this case you would have to look at /var/db/pkg/dev-python/paramiko-*/DEPEND to see if there is really a bug here.
Comment 7 devsk 2010-06-28 06:16:16 UTC
I am not sure I understand your comment Solar. qdepends must find all the packages that depend on paramiko (-Q for reverse dependency). And it doesn't in this case.

How it tries to do that, that's internal to me. May be its doing the wrong thing, that's why its not able to find bzr needing paramiko....:-)
Comment 8 solar (RETIRED) gentoo-dev 2010-06-28 06:57:17 UTC
Don't look at the ebuild. Look at the entry in /var/db/pkg/foo-bar/bzr-x-x/DEPEND or attach it here.
Comment 9 devsk 2010-06-28 15:41:19 UTC
>=app-admin/eselect-python-20091230 =dev-lang/python-2*
Comment 10 solar (RETIRED) gentoo-dev 2010-06-28 18:39:39 UTC
You clearly did not merge bzr with sfp enabled or it would be stored in the vdb.

I'm not sure if you understand that equery and qdepends return very different results by design. Think of qdepends as grep for /var/db/pkg/*

If there is no bug here please say so, and I'll close the ticket.
Comment 11 devsk 2010-06-28 20:34:55 UTC
(In reply to comment #10)
> You clearly did not merge bzr with sfp enabled or it would be stored in the
> vdb.
> 
> I'm not sure if you understand that equery and qdepends return very different
> results by design. Think of qdepends as grep for /var/db/pkg/*
> 
> If there is no bug here please say so, and I'll close the ticket.
> 
Yes, but the reality has changed below it, hasn't it. There is a merged package which requires another package now. 

I think what you are saying is that I should not expect qdepends to behave the way equery depends behaves although I feel equery is doing the right thing.

But now I do understand why and how portage-utils is much faster than equery. You can close this as not-a-bug if you think qdepends is doing the right thing.
Comment 12 Ben Kohler gentoo-dev 2011-06-08 20:43:13 UTC
Is "qdepends -Q foo" supposed to work at all? I'm getting very little output, if any, from most packages I try:

# equery d gtk+ | wc -l
81
# find /var/db/pkg -name DEPEND -exec grep gtk+ {} \; | wc -l
72
# qdepends -Q gtk+ | wc -l
0


Relevant pkg versions:
app-portage/portage-utils-0.5
sys-apps/portage-2.2.0_alpha38
Comment 13 Ronny Perinke 2011-10-12 18:25:46 UTC
(In reply to comment #12)
> Is "qdepends -Q foo" supposed to work at all? I'm getting very little output,
> if any, from most packages I try:
> 
> # equery d gtk+ | wc -l
> 81
> # find /var/db/pkg -name DEPEND -exec grep gtk+ {} \; | wc -l
> 72
> # qdepends -Q gtk+ | wc -l
> 0
> 
> 
> Relevant pkg versions:
> app-portage/portage-utils-0.5
> sys-apps/portage-2.2.0_alpha38

Well, at least with portage-utils-0.3.1, "qdepends -Q cairo" gives me a list of packages that depend on cairo. With portage-utils-0.6, the output is empty.

# emerge =app-portage/portage-utils-0.3.1
q -r
q: Updating ebuild cache ... 
q: Finished 29420 entries in 0.099670 seconds
# qdepends -Q cairo
mail-client/thunderbird-7.0.1-r1
x11-libs/gtk+-3.0.12-r1
x11-libs/gtk+-2.24.6
x11-libs/pango-1.28.4
xfce-base/xfce4-panel-4.8.6
media-libs/gegl-0.1.6
app-text/evince-2.32.0-r3
app-text/poppler-0.16.7
app-text/apvlv-0.1.2
xfce-extra/xfce4-taskmanager-1.0.0
xfce-extra/tumbler-0.1.22
media-sound/audacious-3.0.3-r1
gnome-base/librsvg-2.34.1
media-gfx/gimp-2.6.11-r5
dev-python/pygtk-2.24.0-r1
dev-python/pygobject-2.28.6
dev-python/pycairo-1.10.0-r2
# 

# emerge =app-portage/portage-utils-0.6
# q -r
q: Updating ebuild cache ... 
q: Finished 29420 entries in 0.097984 seconds
# qdepends -Q cairo
# 

# emerge --info
Portage 2.1.10.11 (default/linux/amd64/10.0/no-multilib, gcc-4.5.3, glibc-2.12.2-r0, 3.0.6-gentoo-Sephis-C2D x86_64)
=================================================================
System uname: Linux-3.0.6-gentoo-Sephis-C2D-x86_64-Intel-R-_Core-TM-2_CPU_6400_@_2.13GHz-with-gentoo-2.1
Timestamp of tree: Wed, 12 Oct 2011 16:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.3-r1
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:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r3
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo local_overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fomit-frame-pointer -fno-ident -pipe"
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/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -fomit-frame-pointer -fno-ident -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-4 --timeout=500"
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="/usr/local/overlays"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 audiofile bash-completion berkdb bluetooth branding bzip2 cairo caps cdda cdr cli cracklib crypt cups curl cxx dbus dri dts dvb dvd dvdr encode esd exif expat fam ffmpeg flac fortran gdbm gif glut gnutls gpm gtk howl iconv icq idn introspection ipv6 jpeg lcms libnotify libsexy lirc mad mmx mng modules mp3 mpeg mudflap ncurses nls nptl nptlonly nvidia ogg openal opengl openmp pam pcre pdf png pppd quicktime readline samba sdl session spell sse sse2 sse3 ssl ssse3 startup-notification svg sysfs tcpd theora threads tiff truetype udev unicode usb v4l v4l2 vaapi vcd vdpau vorbis vpx x264 xattr xine xinerama xml xml2 xorg 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="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 proxy proxy_http" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" LIRC_DEVICES="devinput" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XFCE_PLUGINS="trash menu logout clock" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 14 Dennis Schridde 2011-10-21 20:47:53 UTC
I also see this issue here:
$ q depends -Q x11-drivers/xf86-video-ati
$ equery depends x11-drivers/xf86-video-ati
 * These packages depend on x11-drivers/xf86-video-ati:
x11-base/xorg-drivers-1.11 (video_cards_radeon ? x11-drivers/xf86-video-ati)

Both packages are installed and VIDEO_CARDS=radeon is set in make.conf.

(In reply to comment #10)
> I'm not sure if you understand that equery and qdepends return very different
> results by design. Think of qdepends as grep for /var/db/pkg/*
I am missing a description of these design differences in the manpage of qdepends. Also I would like a mode where I can query for dependencies on not-installed packages, like it works with equery. Is it possible to add that?
Comment 15 Ben Kohler gentoo-dev 2013-04-30 14:01:33 UTC
I think the problem here is that "qdepends -Q foo" only checks DEPEND, it does not care about RDEPEND/PDEPEND.  It has options -d -r -p for DEPEND RDEPEND PDEPEND but those don't apply to reverse dep (-Q) lookups.


Example test with openssl reverse deps:

#check installed pkgs' DEPEND only:
find /var/db/pkg -name "DEPEND" -exec grep -H openssl {} \; | wc -l
19
#try qdepends -Q
qdepends -Q openssl 2>/dev/null | wc -l
19
#try equery
equery -q d openssl | wc -l
22
#check installed pkgs' *DEPEND
find /var/db/pkg -name "*DEPEND" -exec grep -H openssl {} \; | awk -F/ '{print $5 "/" $6}' | sort | uniq | wc -l
20


The real reverse dep count here should be 20, there seems to be a bug in equery also which doesn't quite handle USE deps properly.
Comment 16 SpanKY gentoo-dev 2013-05-17 15:29:20 UTC
*** Bug 361905 has been marked as a duplicate of this bug. ***
Comment 17 SpanKY gentoo-dev 2013-09-29 10:35:06 UTC
(In reply to Ben Kohler from comment #15)

the -d/-r/-p options do apply to -Q.  it has since at least Dec 2011 (v0.10).

easily shown with your example:
$ ./qdepends -Q openssl -d | wc
     71      71    3567
$ ./qdepends -Q openssl -r | wc
     72      72    3625
$ ./qdepends -Q openssl -p | wc
      0       0       0