* move package xmls into /var/lib/pisi/package/...

This commit is contained in:
Eray Özkural
2005-12-24 10:49:51 +00:00
parent 214e959fb6
commit ea77a7360e
5 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -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(),
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)
+2 -2
View File
@@ -471,7 +471,7 @@ 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_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 +495,7 @@ 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_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
View File
@@ -720,7 +720,8 @@ If package specs are given, they should be the names of package dirs under /var/
def rebuild_db(self): def rebuild_db(self):
import os 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": if not package_fn == "scripts":
ctx.ui.debug('Resurrecting %s' % package_fn) ctx.ui.debug('Resurrecting %s' % package_fn)
pisi.api.resurrect_package(package_fn) pisi.api.resurrect_package(package_fn)
+1 -1
View File
@@ -93,7 +93,7 @@ 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(), 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
View File
@@ -188,7 +188,7 @@ class Package:
+ self.version + '-' \ + self.version + '-' \
+ self.release + self.release
return util.join_path( ctx.config.lib_dir(), packageDir) return util.join_path( ctx.config.lib_dir(), 'package', packageDir)
def installable(self): def installable(self):
"""calculate if pkg is installable currently""" """calculate if pkg is installable currently"""