* forgotten package dir :'(
This commit is contained in:
+1
-1
@@ -197,7 +197,7 @@ def configure_pending():
|
||||
False,
|
||||
False)
|
||||
pkg_path = util.join_path(ctx.config.lib_dir(),
|
||||
'package/' + pkgname)
|
||||
'package', pkgname)
|
||||
m = MetaData()
|
||||
metadata_path = util.join_path(pkg_path, ctx.const.metadata_xml)
|
||||
m.read(metadata_path)
|
||||
|
||||
@@ -329,7 +329,7 @@ class Remove(AtomicOperation):
|
||||
self.files = ctx.installdb.files(self.package_name)
|
||||
except pisi.Error, e:
|
||||
# for some reason file was deleted, we still allow removes!
|
||||
ctx.ui.error(e)
|
||||
ctx.ui.error(unicode(e))
|
||||
ctx.ui.warning(_('File list could not be read for package %s, continuing removal.') % package_name)
|
||||
self.files = Files()
|
||||
|
||||
@@ -471,7 +471,8 @@ def resurrect_package(package_fn):
|
||||
|
||||
from os.path import exists
|
||||
|
||||
metadata_xml = util.join_path(ctx.config.lib_dir(), 'package/' + package_fn, ctx.const.metadata_xml)
|
||||
metadata_xml = util.join_path(ctx.config.lib_dir(), 'package',
|
||||
package_fn, ctx.const.metadata_xml)
|
||||
if not exists(metadata_xml):
|
||||
raise Error, _("Metadata XML '%s' cannot be found") % metadata_xml
|
||||
|
||||
@@ -495,7 +496,8 @@ def resurrect_package(package_fn):
|
||||
if not passed:
|
||||
ctx.ui.info(_('* Adding \'%s\' to db... ') % (metadata.package.name), noln=True)
|
||||
|
||||
files_xml = util.join_path(ctx.config.lib_dir(), 'package/' + package_fn, ctx.const.files_xml)
|
||||
files_xml = util.join_path(ctx.config.lib_dir(), 'package',
|
||||
package_fn, ctx.const.files_xml)
|
||||
if not exists(files_xml):
|
||||
raise Error, _("Files XML '%s' cannot be found") % files_xml
|
||||
|
||||
|
||||
+2
-1
@@ -93,7 +93,8 @@ class InstallDB:
|
||||
return files
|
||||
|
||||
def pkg_dir(self, pkg, version, release):
|
||||
return join(ctx.config.lib_dir(), 'package/' + pkg + '-' + version + '-' + release)
|
||||
return join(ctx.config.lib_dir(), 'package',
|
||||
pkg + '-' + version + '-' + release)
|
||||
|
||||
def is_recorded(self, pkg, txn = None):
|
||||
pkg = str(pkg)
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ class Package:
|
||||
+ self.metadata.package.version + '-' \
|
||||
+ self.metadata.package.release
|
||||
|
||||
return join( ctx.config.lib_dir(), packageDir)
|
||||
return join( ctx.config.lib_dir(), 'package', packageDir)
|
||||
|
||||
def comar_dir(self):
|
||||
return join(self.pkg_dir(), ctx.const.comar_dir)
|
||||
|
||||
Reference in New Issue
Block a user