diff options
| author | genone <genone@gentoo.org> | 2004-02-16 14:08:03 +0000 |
|---|---|---|
| committer | genone <genone@gentoo.org> | 2004-02-16 14:08:03 +0000 |
| commit | ea63c003f75bda957e777d782cc9d06f0d2a8629 (patch) | |
| tree | 447aae6cbb2ba414042673479280219e16c679b8 | |
| parent | 44f66411b0daf94c77c3abcf2082f36b3bd30992 (diff) | |
| download | gentoolkit-ea63c003f75bda957e777d782cc9d06f0d2a8629.tar.gz | |
fix for bug 41300
svn path=/; revision=84
| -rwxr-xr-x | trunk/src/equery/equery | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index 104b68a..c534a4f 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -267,6 +267,10 @@ class CmdDisplayUSEs(Command): matches = gentoolkit.find_packages(query) + if not matches: + print yellow("No matching packages found for \"%s\"" % query) + return + useflags = gentoolkit.settings["USE"].split() usedesc = {} uselocaldesc = {} @@ -307,9 +311,14 @@ class CmdDisplayUSEs(Command): print "[ Legend : (U) Col 1 - Current USE flags ]" print "[ : (I) Col 2 - Installed With USE flags ]" + if filter(gentoolkit.Package.is_installed, matches): + only_installed = True + else: + only_installed = False + # Iterate through matches, printing a report for each package for p in matches: - if not p.is_installed(): + if not p.is_installed() and only_installed: continue bestver = p.get_cpv() @@ -321,7 +330,11 @@ class CmdDisplayUSEs(Command): usevar = [] inuse = [] - used = p.get_use_vars().split() + if p.is_installed(): + used = p.get_use_vars().split() + else: + # cosmetic issue here as noninstalled packages don't have "used" flags + used = useflags # store (inuse, inused, flag, desc) output = [] |
