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]) + ")"
# | Finds what package a file belongs to |
# `-------------------------------------------------------'
-def belongs(query):
+def belongs(query,matches):
q = query.split()
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:
# +-------------------------------------------------------+
# | 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
# +-------------------------------------------------------+
# | 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