--- policycoreutils-extra/scripts/rlpkg +++ policycoreutils-extra/scripts/rlpkg @@ -90,6 +90,9 @@ def find_installed_packages(search_key): """Returns a list of Package objects that matched the search key.""" + if not isinstance(search_key, str) or not search_key.strip(): + raise ValueError("search_key may not be an empty string") + try: t = portage.db["/"]["vartree"].dbapi.match(search_key) # catch the "amgigous package" Exception