Performing queries of the portage tree to determine uninstalled packages using qpkg -U results in listings of all associated packages regardless of whether they have been installed. The issue seems to be that the -U switch forces the script to ignore ebuilds located in /var/db/pkg rather than use them as a basis for exclusion from the full portage tree. Reproducible: Always Steps to Reproduce: 1. ken@aquarius ken $ qpkg -I gentoolkit app-admin/gentoolkit * 2. ken@aquarius ken $ qpkg -U gentoolkit app-admin/gentoolkit Actual Results: Output as shown above. It's either installed, or not installed, not both! Expected Results: Output from step 2 should have been empty. Portage 2.0.48 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.20 i686 AMD Athlon(tm) Processor GENTOO_MIRRORS="ftp://mirror.iawnet.sandia.gov/pub/gentoo/ http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg libg++ mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline arts tetex svga ggi tcltk java guile mysql postgres X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gnome gtk qt kde motif opengl mozilla cdr php" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-mcpu=athlon -O3 -pipe" CXXFLAGS="-mcpu=athlon -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j4" AUTOCLEAN="yes" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage/" FEATURES="ccache sandbox distcc userpriv usersandbox"
there are some versions of gentoolkit both installed and uninstalled. Try qpkg -I -v gentoolkit and qpkg -U -v gentoolkit If this isn't the correct response reopen the bug.
Here is my output using qpkg -I -v and qpkg -U -v (gentoolkit is provided as an example which must exist because it includes qpkg itself - this bug is repeatable for any packages which are installed on the host system): ---------------------------------------- ken@aquarius ken $ qpkg -I -v gentoolkit app-admin/gentoolkit-0.1.26-r1 * ken@aquarius ken $ qpkg -U -v gentoolkit app-admin/gentoolkit-0.1.26-r1 ----------------------------------------
I have a fix for this, just filters the installed packages out of the uninstalled list with some perl. I have a couple of other local fixes too, so 'qpkg portage' or 'qpkg usr' doesn't return the whole list, and so my mask/non-masked changes are enhanced and less buggy. However I'm reluctant to make a patch right now, since I don't know what revision to start from. It looks like the current qpkg is a bit borked, 1.22 removed a whole bunch of bug fixes: Mispellings "goup" and "twise" are back, an example is badly described again. I'm not sure which of the other changes are re-introduced bugs, and which are real enhancements. So right now we have 1.24 and 1.21, each of which has some bugs the other one doesn't. Can someone diff 1.22 with whatever rev. it was edited from, and then just patch 1.21 based on this? Then we'll have one rev. with all the fixes, which I can diff my local changes against.
I'm marking this won't fix, because qpkg is deprecated in favor of equery.