Add search_installed

This commit is contained in:
Faik Uygur
2008-04-01 12:36:39 +00:00
parent 7bf1fba4a7
commit 3b19fdcebb
+10
View File
@@ -227,6 +227,16 @@ def search_package(terms, lang=None, repo=None):
packagedb = pisi.db.packagedb.PackageDB() packagedb = pisi.db.packagedb.PackageDB()
return packagedb.search_package(terms, lang, repo) return packagedb.search_package(terms, lang, repo)
def search_installed(terms, lang=None):
"""
Return a list of components that contains all the given terms either in its name, summary or
description -> list_of_strings
@param terms: a list of terms used to search components -> list_of_strings
@param lang: language of the summary and description
"""
installdb = pisi.db.installdb.InstallDB()
return installdb.search_package(terms, lang)
def search_source(terms, lang=None, repo=None): def search_source(terms, lang=None, repo=None):
""" """
Return a list of source packages that contains all the given terms either in its name, summary or Return a list of source packages that contains all the given terms either in its name, summary or