* fix: make installed flag work (hopefully)
This commit is contained in:
+8
-6
@@ -244,17 +244,19 @@ 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 = ctx.packagedb.get_package_repo(package_name)
|
||||
if installed:
|
||||
package = ctx.packagedb.get_package(package_name, pisi.itembyrepodb.installed)
|
||||
else:
|
||||
package, repo = ctx.packagedb.get_package_repo(package_name)
|
||||
if repo==pisi.itembyrepodb.installed:
|
||||
raise Error(_('Package %s not found') % package_name)
|
||||
|
||||
if (not installed) and (repo==pisi.itembyrepodb.installed):
|
||||
raise Error(_('Package %s not found') % package_name)
|
||||
|
||||
from pisi.metadata import MetaData
|
||||
metadata = MetaData()
|
||||
metadata.package = package
|
||||
#FIXME: get it from sourcedb
|
||||
#FIXME: get it from sourcedb if available
|
||||
metadata.source = None
|
||||
#TODO: fetch the files from server if possible
|
||||
#TODO: fetch the files from server if possible (wow, you maniac -- exa)
|
||||
if installed and ctx.installdb.is_installed(package.name):
|
||||
files = ctx.installdb.files(package.name)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user