From f38922d3fa199ffc0b2ab392b85d43506f68ddb8 Mon Sep 17 00:00:00 2001 From: genone Date: Fri, 6 Feb 2004 20:59:36 +0000 Subject: [PATCH] fixes svn path=/; revision=75 --- trunk/src/equery/equery | 3 +-- trunk/src/etcat/etcat | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index 3978ccf..3ae4d9d 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -203,10 +203,9 @@ class CmdListBelongs(Command): found = 0 for pkg in matches: - # ignore meta ebuilds and injected packages + cnt = pkg.get_contents() if not cnt: continue - cnt = pkg.get_contents() for file in cnt.keys(): if rx.search(file): print pkg.get_cpv() + " (" + fileAsStr(file, cnt[file]) + ")" diff --git a/trunk/src/etcat/etcat b/trunk/src/etcat/etcat index e4e03f7..5ae5956 100755 --- a/trunk/src/etcat/etcat +++ b/trunk/src/etcat/etcat @@ -473,7 +473,7 @@ def depends(query, matches): # | Finds what package a file belongs to | # `-------------------------------------------------------' -def belongs(query): +def belongs(query,matches): q = query.split() @@ -485,10 +485,10 @@ def belongs(query): item=q[0] cat="*" fn=None + matches = gentoolkit.find_all_installed_packages(fn) print "Searching for " + item + " in " + cat + " ..." - matches = gentoolkit.find_all_installed_packages(fn) rx = re.compile(item) for pkg in matches: @@ -504,7 +504,7 @@ def belongs(query): # +-------------------------------------------------------+ # | Finds the size of installed packages | # `-------------------------------------------------------' -def size(query): +def size(query,packages): packages = gentoolkit.find_packages(query) if not report_matches(query, packages): return @@ -545,8 +545,7 @@ def report_matches(query, matches, installed_only=1): # +-------------------------------------------------------+ # | Lists all the files in a package | # `-------------------------------------------------------' -def files(query): - matches = gentoolkit.find_packages(query) +def files(query,matches): if not report_matches(query, matches): return -- 2.26.2