From: Berk Cakar <berk2238@hotmail.com>
Date: Sat, 10 Jul 2021 14:50:47 +0300
Subject: [PATCH] PackageKit Search Bug Fix

---
 pisi/api.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pisi/api.py b/pisi/api.py
index e8260c4..630aa65 100644
--- a/pisi/api.py
+++ b/pisi/api.py
@@ -25,6 +25,7 @@ import pisi.util
 import pisi.pgraph as pgraph
 import pisi.db.packagedb
 import pisi.db.repodb
+import pisi.db.filesdb
 import pisi.db.filesldb
 import pisi.db.installdb
 import pisi.db.historydb
@@ -401,9 +402,10 @@ def search_file(term):
 
     >>> [("kvm", (["lib/modules/2.6.18.8-86/extra/kvm-amd.ko","lib/modules/2.6.18.8-86/extra/kvm-intel.ko"])),]
     """
+    filesdb = pisi.db.filesdb.FilesDB()
     if term.startswith("/"): # FIXME: why? why?
         term = term[1:]
-    return ctx.filesdb.search_file(term)
+    return filesdb.search_file(term)
 
 def fetch(packages=[], path=os.path.curdir):
     """
-- 
2.24.3 (Apple Git-128)
