* fix: packagedb, get_rev_deps impl. was broken...

* fix: wrong msg in packagedb use
This commit is contained in:
Eray Özkural
2006-03-22 21:02:02 +00:00
parent a6817216cc
commit 43a29cdc91
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ def info_file(package_fn):
def info_name(package_name, installed=False):
"""fetch package information for a package"""
if ctx.packagedb.has_package(package_name):
package, repo = pkgdb.get_package(package_name)
package, repo = ctx.packagedb.get_package_repo(package_name)
if (not installed) and (repo==pisi.itembyrepodb.installed):
raise Error(_('Package %s not found') % package_name)
+4 -3
View File
@@ -66,9 +66,10 @@ class PackageDB(object):
return self.d.which_repo(name, repo, txn)
def get_rev_deps(self, name):
x = self.dr.get_item(self, name)
if not x:
x = []
if self.dr.has_key(name):
return self.dr.get_item(name)
else:
return []
def list_packages(self, repo=None):
return self.d.list(repo)