# `-------------------------------------------------------'
def versions(query, matches):
+ # this function should also report masked packages
+ matches = gentoolkit.find_packages(query, masked=True)
if not report_matches(query,matches):
return
- # sorting result list
+ # sorting result list
matches = gentoolkit.sort_package_list(matches)
# FIXME: old version printed result of regex search on name,
print red("!!!"), " "+p
else:
print red("!!!"), "Internal portage error, terminating"
- if len(e[0])):
+ if len(e[0]):
print red("!!!"), e[0]
sys.exit(2)
function = globals()[action]
# Global helper functions
#
-def find_packages(search_key):
+def find_packages(search_key, masked=False):
"""Returns a list of Package objects that matched the search key."""
- # FIXME: this one failes if search_key contains version suffix
- t=portage.portdb.match(search_key)
+ if masked:
+ t=portage.portdb.xmatch("match-all", search_key)
+ else:
+ t=portage.portdb.match(search_key)
return [Package(x) for x in t]
def find_best_match(search_key):