Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 69456 - equery list -p doesnt show un-/stable status for installed packages
Summary: equery list -p doesnt show un-/stable status for installed packages
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-29 14:08 UTC by Daniel Webert
Modified: 2005-11-11 20:36 UTC (History)
1 user (show)

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


Attachments
do gentoolkit.find_all_installed_packages look like gentoolkit.find_all_uninstalled_packages (gentoolkit-helpers.py.patch,664 bytes, patch)
2005-05-07 10:31 UTC, Hanno Zysik (geki)
Details | Diff
commented 'if not self.is_installed()' clause (gentoolkit-package.py.patch,468 bytes, patch)
2005-05-07 11:04 UTC, Hanno Zysik (geki)
Details | Diff
comment if clause (v2) (gentoolkit-package.py.patch,545 bytes, patch)
2005-05-07 11:10 UTC, Hanno Zysik (geki)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Webert 2004-10-29 14:08:27 UTC
equery list -p doesnt show un-/stable status for installed packages

equery -V (0.1.3)

packages.g.o says for x86:
gcc-3.4.2-r3 ~
gcc-3.4.2-r2 ~
gcc-3.4.1-r3 ~
gcc-3.4.1-r2 ~
gcc-3.4.1 ~

but equery says the 'installed packages' are stable ...

<snip>
rockoo@porkoo ~ $ sudo equery l -p gcc
[ Searching for package 'gcc' in all categories among: ]
 * installed packages
[I--] [  ] sys-devel/gcc-3.4.1-r3 (3.4)
[I--] [  ] sys-devel/gcc-3.4.2-r2 (i686-pc-linux-gnu-3.4)
[I--] [  ] sys-devel/gcc-config-1.3.7-r1 (0)
 * Portage tree (/usr/portage)
[-P-] [M ] sys-devel/gcc-2.95.3-r8 (2.95)
[-P-] [M ] sys-devel/gcc-3.1.1-r2 (3.1)
[-P-] [M ] sys-devel/gcc-3.2.3-r4 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.1-r5 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.2-r1 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.2-r2 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.2-r3 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.2-r4 (3.2)
[-P-] [M ] sys-devel/gcc-3.3.2-r5 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.2-r7 (3.2)
[-P-] [M-] sys-devel/gcc-3.3.2 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.3-r3 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.3-r5 (3.2)
[-P-] [M ] sys-devel/gcc-3.3.3-r6 (3.2)
[-P-] [M~] sys-devel/gcc-3.3.3 (3.2)
[-P-] [  ] sys-devel/gcc-3.3.4-r1 (3.2)
[-P-] [ ~] sys-devel/gcc-3.3.4-r2 (3.2)
[-P-] [M-] sys-devel/gcc-3.3 (3.2)
[-P-] [ ~] sys-devel/gcc-3.4.1-r2 (3.4)
[-P-] [ ~] sys-devel/gcc-3.4.1 (3.4)
[-P-] [ ~] sys-devel/gcc-3.4.2-r3 (3.4)
[-P-] [M-] sys-devel/gcc-3.3.3_pre20040426 (3.2)
[-P-] [M-] sys-devel/gcc-3.3.3_pre20040408-r1 (3.2)
[-P-] [  ] sys-devel/gcc-compat-1.4 (0)
[-P-] [  ] sys-devel/gcc-config-1.3.6-r3 (0)
...
</snip>
Comment 1 Hanno Zysik (geki) 2005-05-07 09:44:46 UTC
what the hell is this? this is truly bugged. it seems i got no gcc, cool. ;)

anomalie ~ # equery list -i gcc
[ Searching for package 'gcc' in all categories among: ]
 * installed packages
anomalie ~ #
Comment 2 Hanno Zysik (geki) 2005-05-07 10:05:07 UTC
neither shows unstable status for installed overlay packages

anomalie ~ # equery list -o gcc
[ Searching for package 'gcc' in all categories among: ]
 * installed packages
[I--] [  ] sys-devel/gcc-3.4.3.20050110-r2 (3.4)
[I--] [M ] sys-devel/gcc-4.0.0.20050423 (4.0)
 * overlay tree (/usr/local/portage)
[--O] [M ] sys-devel/gcc-4.0.0.20050423 (4.0)
anomalie ~ #
Comment 3 Hanno Zysik (geki) 2005-05-07 10:31:08 UTC
Created attachment 58285 [details, diff]
do gentoolkit.find_all_installed_packages look like gentoolkit.find_all_uninstalled_packages

well, no idea if that patch is useful. at least it lets installed versions show
up now with: equery list gcc

anomalie ~ # equery list gcc
[ Searching for package 'gcc' in all categories among: ]
 * installed packages
[I--] [  ] sys-devel/gcc-3.4.3.20050110-r2 (3.4)
[I--] [M ] sys-devel/gcc-4.0.0.20050423 (4.0)
anomalie ~ #
Comment 4 Hanno Zysik (geki) 2005-05-07 10:48:45 UTC
just for info

added print( "Keywords: " + pkg.get_env_var("KEYWORDS") + " |" ) to equery for debugging

cut of /usr/bin/equery

        def _get_mask_status(self, pkg):
                pkgmask = 0
                if pkg.is_masked():
                        pkgmask = pkgmask + 3

                keywords = pkg.get_env_var("KEYWORDS").split()
                print( "Keywords: " + pkg.get_env_var("KEYWORDS") + " |" )
                if "~" + gentoolkit.settings["ARCH"] in keywords:
                        pkgmask = pkgmask + 1
                
                if "-*" in keywords or "-" + gentoolkit.settings["ARCH"] in keywords:
                        pkgmask = pkgmask + 2
                
                return pkgmask

output:
anomalie ~ # equery list gcc
[ Searching for package 'gcc' in all categories among: ]
 * installed packages
Keywords:  |
[I--] [  ] sys-devel/gcc-3.4.3.20050110-r2 (3.4)
Keywords:  |
[I--] [M ] sys-devel/gcc-4.0.0.20050423 (4.0)
anomalie ~ #

so it does not get any keywords for installed packages ...

but for other it does:
anomalie ~ # equery list -p gcc
[ Searching for package 'gcc' in all categories among: ]
 * installed packages
Keywords:  |
[I--] [  ] sys-devel/gcc-3.4.3.20050110-r2 (3.4)
Keywords:  |
[I--] [M ] sys-devel/gcc-4.0.0.20050423 (4.0)
 * Portage tree (/usr/portage)
Keywords: x86 ppc sparc alpha |
[-P-] [M ] sys-devel/gcc-2.95.3-r8 (2.95)
Keywords: x86 sparc -ppc |
[-P-] [M ] sys-devel/gcc-3.1.1-r2 (3.1)
Keywords: x86 ppc sparc mips alpha -hppa ia64 s390 |
[-P-] [M ] sys-devel/gcc-3.2.3-r4 (3.2)
Keywords: -* hppa |
[-P-] [M-] sys-devel/gcc-3.3.2 (3.3)
Keywords: x86 mips ~sparc ~amd64 -hppa alpha -ia64 ppc64 |
[-P-] [M ] sys-devel/gcc-3.3.2-r5 (3.3)
Keywords: x86 mips ~sparc ~amd64 -hppa alpha ia64 ppc64 |
[-P-] [M ] sys-devel/gcc-3.3.2-r7 (3.3)
Keywords: ~alpha ~amd64 arm hppa -ia64 ~mips s390 sh sparc x86 |
[-P-] [  ] sys-devel/gcc-3.3.5-r1 (3.3)
Keywords: ~alpha ~amd64 ~arm ~hppa -ia64 ~mips ~sh sparc ~x86 |
[-P-] [ ~] sys-devel/gcc-3.3.5.20050130 (3.3)
Keywords: ~alpha ~amd64 arm ~hppa -ia64 ~mips sh sparc x86 |
[-P-] [  ] sys-devel/gcc-3.3.5.20050130-r1 (3.3)
Keywords: ~alpha ~amd64 ~arm ~hppa -ia64 ~mips ~sh ~sparc ~x86 |
[-P-] [ ~] sys-devel/gcc-3.3.5.20050130-r2 (3.3)
Keywords: -* ~amd64 mips ppc64 ~x86 -hppa ppc s390 |
[-P-] [M ] sys-devel/gcc-3.4.1-r3 (3.4)
Keywords: -* amd64 mips ppc64 ~x86 -hppa ppc ~sparc -ia64 |
[-P-] [M ] sys-devel/gcc-3.4.3-r1 (3.4)
Keywords: -* ~amd64 ~mips ~ppc64 ~x86 -hppa ~ppc ~sparc ~ia64 |
[-P-] [M ] sys-devel/gcc-3.4.3.20050110-r1 (3.4)
Keywords: -* |
[-P-] [M-] sys-devel/gcc-4.0.0_beta20050416 (4.0)
Keywords: -* |
[-P-] [M-] sys-devel/gcc-4.0.0 (4.0)


anyone any ideas? I am no python head  i just hack :)
Comment 5 Hanno Zysik (geki) 2005-05-07 11:04:14 UTC
Created attachment 58289 [details, diff]
commented 'if not self.is_installed()' clause

now it shows unstable flag for installed/overlay packages aswell.

anyone of the devs may explain these patches and what they do/do wrong/bad.
same for Bug #91286. however, this seems really strange to me but works
somehow. heh
Comment 6 Hanno Zysik (geki) 2005-05-07 11:10:11 UTC
Created attachment 58290 [details, diff]
comment if clause (v2)

hell, python checks for tabs. :)
Comment 7 Paul Varner (RETIRED) gentoo-dev 2005-11-11 20:36:47 UTC
Portage doesn't store the keywords for installed packages.  Since I can't rely
on the package still being in the portage tree, I am unable to reliably get the
keywords for installed packages.