From ea63c003f75bda957e777d782cc9d06f0d2a8629 Mon Sep 17 00:00:00 2001 From: genone Date: Mon, 16 Feb 2004 14:08:03 +0000 Subject: [PATCH] fix for bug 41300 svn path=/; revision=84 --- trunk/src/equery/equery | 17 +++++++++++++++-- 1 file 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 = [] -- 2.26.2