From 3b19fdcebb24f8a7fa92b6d634fca449a20bd563 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Tue, 1 Apr 2008 12:36:39 +0000 Subject: [PATCH] Add search_installed --- pisi/api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pisi/api.py b/pisi/api.py index d0fddfd9..120d8649 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -227,6 +227,16 @@ def search_package(terms, lang=None, repo=None): packagedb = pisi.db.packagedb.PackageDB() 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): """ Return a list of source packages that contains all the given terms either in its name, summary or