Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36355 - qpkg does not acknowledge the rebuild and removal of a dependancy
Summary: qpkg does not acknowledge the rebuild and removal of a dependancy
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-23 04:14 UTC by Charles Phoenix
Modified: 2004-08-21 13:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to use dependency USE flags correctly (qpkg.patch.5,748 bytes, patch)
2003-12-24 10:34 UTC, Paul Varner (RETIRED)
Details | Diff
Updated patch for the latest qpkg in gentoolkit-0.2.0_pre8 (qpkg.patch,857 bytes, patch)
2004-04-21 21:02 UTC, Paul Varner (RETIRED)
Details | Diff
Patch to look at USE flags for Installed/Uninstalled packages (qpkg.patch,1.71 KB, patch)
2004-04-21 22:34 UTC, Paul Varner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Phoenix 2003-12-23 04:14:12 UTC
In this case I am removing slang from my system.

bash-2.05b# qpkg -I -q slang
sys-libs/slang-1.4.9 *
DEPENDED ON BY:
        nano-1.3.0
        mc-4.6.0-r4
        aalib-1.4_rc4-r2
        timidity++-2.12.0-r3

So I added  the -slang and recompiled nano, mc, aalib (timidity is failing on an alsa issue)

to prove that slang has been removed from mc here is it's output

GNU Midnight Commander 4.6.0
Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish, undelfs
With builtin Editor
Using the ncurses library
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support


yet qpkg does not acknowledge the change

bash-2.05b# qpkg -I -q slang
sys-libs/slang-1.4.9 *
DEPENDED ON BY:
        nano-1.3.0
        mc-4.6.0-r4
        aalib-1.4_rc4-r2
        timidity++-2.12.0-r3

the only one that should be listed is timidity++

System uname: 2.4.23_pre8-gss i686 AMD Athlon(tm) XP 2100+
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O2 -fomit-frame-pointer -pipe"
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/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ibiblio.org/pub/Linux/distributions/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://adelie.polymtl.ca/"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi acpi4linux alsa apm arts avantgo avi caps cdr crypt cups directfb doc dv dvd dvdr encode faad ffmpeg flash foomaticdb gd gdbm ggi gif gphoto2 gpm gtk hbci imagemagick imlib imlib2 java javascript jbig joystick jpeg kde lcms lirc mad mbox md5sum mikmod mmx mozilla mozinterfaceinfo moznocompose moznoirc moznomail mozsvg mozxmlterm mpeg mysql nas ncurses nls offensive ofx oggvorbis opengl pam pdflib perl physfs pic png ppds python qt quicktime readline scanner sdl sis spell sqlite ssl svga tcpd tetex tiff truetype usb v4l wmf x86 xinerama xml2 xosd xv xvid zlib zvbi linguas_en_US"



Reproducible: Always
Steps to Reproduce:
Comment 1 Charles Phoenix 2003-12-24 00:47:47 UTC
behavior the same for different package

this time tcl

bash-2.05b# qpkg -I -q tcl
dev-lang/tcl-8.4.4 *
DEPENDED ON BY:
        db-4.1.25_p1-r3

confirmed the presence of -tcltk

bash-2.05b# emerge -pv db

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-libs/db-4.1.25_p1-r3  -tcltk +java +doc

rebuilt db

change not registered by qpkg

bash-2.05b# qpkg -I -q tcl
dev-lang/tcl-8.4.4 *
DEPENDED ON BY:
        db-4.1.25_p1-r3
Comment 2 Paul Varner (RETIRED) gentoo-dev 2003-12-24 10:34:07 UTC
Created attachment 22638 [details, diff]
Patch to use dependency USE flags correctly

I haven't extensively tested this patch yet. As far as I can tell it is working
correctly.
Comment 3 Eric Paynter 2004-04-21 15:58:00 UTC
The patch doesn't seem to have any effect for me. I applied it to the qpkg from gentoolkit-0.2.0_pre8 and still have the problem.

An example of the problem: I recently changed from sasl to -sasl use flag. I did "emerge -C cyrus-sasl" and I upgraded openldap to 2.1.26.

qpkg shows the dependency is still there even though equery shows that the flag is not in use:

# qpkg -q cyrus-sasl-2.1.17
dev-libs/cyrus-sasl-2.1.17
DEPENDED ON BY:
        net-nds/openldap-2.1.26
# equery uses openldap
[ Colour Code : set unset ]
[ Legend    : (U) Col 1 - Current USE flags        ]
[           : (I) Col 2 - Installed With USE flags ]

 U I [ Found these USE variables in : net-nds/openldap-2.1.26 ]
 + + berkdb   : Adds support for sys-libs/db (Berkeley DB for MySQL)
 + + crypt    : Add support for encryption -- using mcrypt or gpg where applicable
 - - debug    : Tells configure and the makefiles to build for debugging. Effects vary acrosss packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES+=nostrip too.
 + + gdbm     : Adds support for sys-libs/gdbm (GNU database libraries)
 - - ipv6     : Adds support for IP version 6
 - - kerberos : Adds kerberos support
 - - odbc     : Adds ODBC Support (Open DataBase Connectivity)
 + + perl     : Adds support/bindings for the Perl language.
 + + readline : enables support for libreadline, a GNU line-editing library that most everyone wants.
 - - samba    : Adds support for SAMBA
 - - sasl     : Adds support for the Simple Authentication and Security Layer
 - - slp      : Adds Service Locator Protocol support to CUPS
 + + ssl      : Adds support for Secure Socket Layer connections
 + + tcpd     : Adds support for TCP wrappers
#
Comment 4 Paul Varner (RETIRED) gentoo-dev 2004-04-21 21:02:30 UTC
Created attachment 29798 [details, diff]
Updated patch for the latest qpkg in gentoolkit-0.2.0_pre8

Between the time when I wrote the original patch and the latest version of
qpkg, single quotes were used to surround a sed statement containg a variable. 
This means that the script doesn't expand the flag variable used to remove the
package from the list of candidates.  This updated patch changes the single
quotes back to double quotes to allow the variable expansion.  I will post the
results of my testing shortly
Comment 5 Paul Varner (RETIRED) gentoo-dev 2004-04-21 21:12:25 UTC
1. env USE="ldap" emerge -pv pine

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-mail/pine-4.58  -debug +ldap +ssl  0 kB

2. env USE="ldap" emerge -v pine

3. qpkg -I -q openldap
net-nds/openldap-2.1.26 *
DEPENDED ON BY:
        pine-4.58

4. emerge -pv pine

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-mail/pine-4.58  -debug -ldap +ssl  0 kB

Total size of downloads: 0 kB

5. emerge -v pine

6. qpkg -I -q openldap
net-nds/openldap-2.1.26 *
DEPENDED ON BY:

7. emerge -C openldap

8. qpkg -I -q openldap-2.1.26
net-nds/openldap-2.1.26
DEPENDED ON BY:
        app-crypt/gnupg-1.2.4
        dev-libs/cyrus-sasl-2.1.14
        dev-php/mod_php-4.3.6_rc2
        dev-php/php-4.3.4-r4
        kde-base/kdebase-3.2.1
        kde-base/kdelibs-3.2.1
        kde-base/kdepim-3.2.1
        net-mail/courier-imap-3.0.2
        net-mail/evolution-1.4.5
        net-mail/pine-4.58
        net-mail/postfix-2.0.19
        net-mail/squirrelmail-1.4.2-r3
        net-misc/curl-7.10.8-r1

Based upon this limited test, the update patch appears to working correctly again.  Please note that the patch only works against packages that are installed.  If the package is uninstalled, only the possible dependencies are checked and not the USE flags.

Finally, I would like to request that the Portage tools team consider patching qpkg with this patch as the current behavior of qpkg is buggy with respect to USE flags and the equery depends command has not been implemented yet.
Comment 6 Eric Paynter 2004-04-21 21:55:36 UTC
I applied the patch but still get the same behaviour as in Comment #3 - qpkg thinks openldap depends on cyrus-sasl, even though -sasl use flag is set and openldap was not compiled with sasl support. sasl is not even installed on the system.

I also don't understand the results of step 8 from Comment #5. You just removed openldap from the system is step 7, so shouldn't the -I cause qpkg to return nothing (e.g. there are no versions of openldap installed to check for the dependencies of)?
Comment 7 Paul Varner (RETIRED) gentoo-dev 2004-04-21 22:20:50 UTC
That was a bad cut-n-paste.  The command I ran was qpkg -q openldap-2.1.26.  Running with -I does indeed return nothing.  

The point I was trying to make with step 8 is that if the software isn't installed on the system, then qpkg only looks at the possible dependencies, it doesn't take any USE flag settings into account.  

If you were to reinstall cyrus-sasl and run qpkg -I -q cyrus-sasl-2.1.17 you should not see openldap as a dependency. If I have the time, I will look into developing a patch to take the current USE settings into account when looking at uninstalled packages.
Comment 8 Paul Varner (RETIRED) gentoo-dev 2004-04-21 22:34:16 UTC
Created attachment 29799 [details, diff]
Patch to look at USE flags for Installed/Uninstalled packages

Okay, I looked at the code again and the patch was simple.  This version of the
patch will look at the USE flag settings for both installed and uninstalled
packages.
Comment 9 Eric Paynter 2004-04-21 22:47:12 UTC
Works for cyrus-sasl/openldap, but it still thinks links requires svgalib:

# qpkg -q svgalib-1.9.18-r1
media-libs/svgalib-1.9.18-r1
DEPENDED ON BY:
        links-2.1_pre11
# equery uses links
[ Colour Code : set unset ]
[ Legend    : (U) Col 1 - Current USE flags        ]
[           : (I) Col 2 - Installed With USE flags ]

 U I [ Found these USE variables in : net-www/links-2.1_pre11 ]
 - - directfb   : Adds support for DirectFB layer (library for FB devices)
 + + ssl        : Adds support for Secure Socket Layer connections
 - - javascript : enable javascript support
 + + png        : Adds support for libpng (PNG images)
 - - X          : Adds support for XFree86
 + + gpm        : Adds support for sys-libs/gpm (Console-based mouse driver)
 - - tiff       : Adds support for the tiff image format
 - - fbcon      : Adds framebuffer support for the console, via the kernel
 - - svga       : Adds support for SVGAlib (graphics library)
 + + jpeg       : Adds JPEG image support
Comment 10 Paul Varner (RETIRED) gentoo-dev 2004-04-22 21:11:14 UTC
I don't have a good answer for that case.  I know what is causing the problem, but I don't know a solution that doesn't break other things.
Comment 11 Marius Mauch (RETIRED) gentoo-dev 2004-08-21 13:43:52 UTC
this tool is deprecated