Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353223 - app-portage/portage-utils: qlist ignores SLOT's for uniqueness
Summary: app-portage/portage-utils: qlist ignores SLOT's for uniqueness
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-30 12:09 UTC by Pacho Ramos
Modified: 2012-10-28 06:28 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 Pacho Ramos gentoo-dev 2011-01-30 12:09:03 UTC
I hit this problem while trying to regenerate list of provided packages by latest emul-linux-x86 set.

If I have the following ../emul-linux-x86-motif file:

# cat ../emul-linux-x86-motif
# http://bugs.gentoo.org/show_bug.cgi?id=337967
# http://bugs.gentoo.org/show_bug.cgi?id=247696
x11-libs/openmotif:0
x11-libs/openmotif:2.2

And I run qlist as follows:

# qlist -ICve $(sort -u ../emul-linux-x86-motif)
x11-libs/openmotif-2.3.3

It only shows latest version from latest slot instead of both (I have both installed).

On the other hand, if ../emul-linux-x86-motif file also contains unslotted pkgname:

# cat ../emul-linux-x86-motif
# http://bugs.gentoo.org/show_bug.cgi?id=337967
# http://bugs.gentoo.org/show_bug.cgi?id=247696
x11-libs/openmotif:0
x11-libs/openmotif:2.2
x11-libs/openmotif

I get proper result:

# qlist -ICve $(sort -u ../emul-linux-x86-motif)
x11-libs/openmotif-2.2.3-r11
x11-libs/openmotif-2.3.3

This is with both, 0.3.1 and 0.4 versions

Thanks

Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2011-01-30 12:10:07 UTC
(bug references are simply got from original file, simply ignore them)
Comment 2 Pacho Ramos gentoo-dev 2011-01-30 12:26:47 UTC
qlist is used as follows to generate documentation file:

$(for pkgset in $(qlist -ICve $(sort -u ../emul-linux-x86-$x ) ; do              
        pv=$(qatom $pkgset | awk '{print $3}')
        pvr=$(qatom $pkgset | awk '{print $4}')
        [[ $pvr != "" ]] && pvr="$pv-$pvr" || pvr="$pv"
        cp=$(qatom $pkgset | awk '{print $1"/"$2}')
        echo $cp $pvr | awk '{print "<tr><th>"$1"</th><th>"$2"</th></tr>"}'
done)

I have tried to append cut -d: -f1 to qlist command but, even it working if I manually running only qlist command, it still fails when running in script :-(
Comment 3 Alex Buell 2011-10-03 21:33:06 UTC
qlist doesn't show the version that's what the problem is. I have the following:

 $ qlist -IC dev-lang
dev-lang/R
dev-lang/fpc
dev-lang/gnat-gcc
dev-lang/lua
dev-lang/mono
dev-lang/nasm
dev-lang/orc
dev-lang/perl
dev-lang/php
dev-lang/php
dev-lang/python
dev-lang/python
dev-lang/python
dev-lang/ruby
dev-lang/swig
dev-lang/tcl
dev-lang/tk
dev-lang/vala
dev-lang/vala
dev-lang/yasm

For example, there are three instances of python, that would be 2.6.6, 2.7.1 and 3.1.1. I concur that qlist needs to be a bit more intelligent about the versions. This is with 0.3.1.
Comment 4 SpanKY gentoo-dev 2012-10-28 06:28:03 UTC
$ qlist -Iv x11-libs/gtksourceview
x11-libs/gtksourceview-2.10.5-r2
x11-libs/gtksourceview-3.4.2
$ qlist -IvS x11-libs/gtksourceview
x11-libs/gtksourceview-2.10.5-r2:2.0
x11-libs/gtksourceview-3.4.2:3.0
$ qlist -IvS gtksourceview:{2,3}.0
x11-libs/gtksourceview-2.10.5-r2:2.0
x11-libs/gtksourceview-3.4.2:3.0

http://sources.gentoo.org/gentoo-projects/portage-utils/main.c?r1=1.221&r2=1.222
http://sources.gentoo.org/gentoo-projects/portage-utils/qlist.c?r1=1.72&r2=1.73
http://sources.gentoo.org/gentoo-projects/portage-utils/libq/vdb.c?r1=1.4&r2=1.5