fixes
authorgenone <genone@gentoo.org>
Fri, 6 Feb 2004 20:59:36 +0000 (20:59 -0000)
committergenone <genone@gentoo.org>
Fri, 6 Feb 2004 20:59:36 +0000 (20:59 -0000)
svn path=/; revision=75

trunk/src/equery/equery
trunk/src/etcat/etcat

index 3978ccf102825b0b9d6fccbe579bf98ec1229810..3ae4d9d472acd76de0773bf18bac4ccc3c33b444 100755 (executable)
@@ -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]) + ")"
index e4e03f73699c98d557213b5d8835333935d652b9..5ae5956bbeff3cfef2e0216469c290b00e9dd869 100755 (executable)
@@ -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