* fix: packagedb, get_rev_deps impl. was broken...
* fix: wrong msg in packagedb use
This commit is contained in:
+1
-1
@@ -243,7 +243,7 @@ def info_file(package_fn):
|
|||||||
def info_name(package_name, installed=False):
|
def info_name(package_name, installed=False):
|
||||||
"""fetch package information for a package"""
|
"""fetch package information for a package"""
|
||||||
if ctx.packagedb.has_package(package_name):
|
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):
|
if (not installed) and (repo==pisi.itembyrepodb.installed):
|
||||||
raise Error(_('Package %s not found') % package_name)
|
raise Error(_('Package %s not found') % package_name)
|
||||||
|
|||||||
+4
-3
@@ -66,9 +66,10 @@ class PackageDB(object):
|
|||||||
return self.d.which_repo(name, repo, txn)
|
return self.d.which_repo(name, repo, txn)
|
||||||
|
|
||||||
def get_rev_deps(self, name):
|
def get_rev_deps(self, name):
|
||||||
x = self.dr.get_item(self, name)
|
if self.dr.has_key(name):
|
||||||
if not x:
|
return self.dr.get_item(name)
|
||||||
x = []
|
else:
|
||||||
|
return []
|
||||||
|
|
||||||
def list_packages(self, repo=None):
|
def list_packages(self, repo=None):
|
||||||
return self.d.list(repo)
|
return self.d.list(repo)
|
||||||
|
|||||||
Reference in New Issue
Block a user