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