* move package xmls into /var/lib/pisi/package/...
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(),
|
||||
pkgname)
|
||||
'package/' + pkgname)
|
||||
m = MetaData()
|
||||
metadata_path = util.join_path(pkg_path, ctx.const.metadata_xml)
|
||||
m.read(metadata_path)
|
||||
|
||||
@@ -471,7 +471,7 @@ def resurrect_package(package_fn):
|
||||
|
||||
from os.path import exists
|
||||
|
||||
metadata_xml = util.join_path(ctx.config.lib_dir(), 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 +495,7 @@ 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_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
|
||||
|
||||
|
||||
@@ -720,7 +720,8 @@ If package specs are given, they should be the names of package dirs under /var/
|
||||
|
||||
def rebuild_db(self):
|
||||
import os
|
||||
for package_fn in os.listdir(ctx.config.lib_dir()):
|
||||
for package_fn in os.listdir( pisi.util.join_path( ctx.config.lib_dir(),
|
||||
'package' ) ):
|
||||
if not package_fn == "scripts":
|
||||
ctx.ui.debug('Resurrecting %s' % package_fn)
|
||||
pisi.api.resurrect_package(package_fn)
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ class InstallDB:
|
||||
return files
|
||||
|
||||
def pkg_dir(self, pkg, version, release):
|
||||
return join(ctx.config.lib_dir(), 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
@@ -188,7 +188,7 @@ class Package:
|
||||
+ self.version + '-' \
|
||||
+ self.release
|
||||
|
||||
return util.join_path( ctx.config.lib_dir(), packageDir)
|
||||
return util.join_path( ctx.config.lib_dir(), 'package', packageDir)
|
||||
|
||||
def installable(self):
|
||||
"""calculate if pkg is installable currently"""
|
||||
|
||||
Reference in New Issue
Block a user