diff --git a/pisi/api.py b/pisi/api.py index 994c214e..8b484b88 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -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) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index 31713b8c..5702fe9b 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -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 diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 0cf65d09..a22bbfda 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -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) diff --git a/pisi/installdb.py b/pisi/installdb.py index f82eeae4..27296a4f 100644 --- a/pisi/installdb.py +++ b/pisi/installdb.py @@ -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) diff --git a/pisi/specfile.py b/pisi/specfile.py index 0b8eca3d..d2412423 100644 --- a/pisi/specfile.py +++ b/pisi/specfile.py @@ -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"""