diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index e96af347..d7396535 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -819,6 +819,7 @@ Finds the installed package which contains the specified file. search_exact = staticmethod(search_exact) def run(self): + import os.path self.init(True) @@ -830,7 +831,7 @@ Finds the installed package which contains the specified file. for path in self.args: ctx.ui.info(_('Searching for %s') % path) if os.path.exists(path): - search_exact(os.path.realpath(path)) + self.search_exact(os.path.realpath(path)) else: pisi.api.error(_('%s cannot be found')) diff --git a/pisi/files.py b/pisi/files.py index 868ec76b..d2e7576c 100644 --- a/pisi/files.py +++ b/pisi/files.py @@ -103,14 +103,14 @@ class FilesDB(shelve.LockedDBShelf): shelve.LockedDBShelf.__init__(self, 'files') #self.files_dir = pisi.util.join_path(ctx.config.db_dir(), 'files') - def add_files(pkg_name, files): + def add_files(self, pkg_name, files): for x in files.list: self[x.path] = (pkg_name, x) - def has_file(path): + def has_file(self, path): return self.has_key(path) - def get_file_info(path): + def get_file_info(self, path): if not self.has_key(path): return None else: