From 057d321ea8cbb2816cc28b3af626f6f25dcc3ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Thu, 24 Nov 2005 19:52:02 +0000 Subject: [PATCH] =?UTF-8?q?e=C4=9Fer=20paket=20bir=20=C5=9Fekilde=20(mesel?= =?UTF-8?q?a=20bypass-safety=20ile)=20kald=C4=B1r=C4=B1lm=C4=B1=C5=9F=20am?= =?UTF-8?q?a=20post-install'u=20=C3=A7al=C4=B1=C5=9Ft=C4=B1r=C4=B1lmam?= =?UTF-8?q?=C4=B1=C5=9Fsa=20=C3=A7al=C4=B1=C5=9Ft=C4=B1rmaya=20=C3=A7al?= =?UTF-8?q?=C4=B1=C5=9Fma=20ve=20pending=20listesinden=20sil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/api.py | 21 +++++++++++---------- pisi/installdb.py | 5 +++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/pisi/api.py b/pisi/api.py index 92014bde..19f569bc 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -176,22 +176,23 @@ def configure_pending(): try: import pisi.comariface as comariface for x in order: - pkginfo = A[x] - pkgname = util.package_name(x, pkginfo.version, + if ctx.installdb.is_installed(x): + pkginfo = A[x] + pkgname = util.package_name(x, pkginfo.version, pkginfo.release, False, False) - pkg_path = util.join_path(ctx.config.lib_dir(), + pkg_path = util.join_path(ctx.config.lib_dir(), pkgname) - m = MetaData() - metadata_path = util.join_path(pkg_path, ctx.const.metadata_xml) - m.read(metadata_path) - for pcomar in m.package.providesComar: - scriptPath = util.join_path(pkg_path, + m = MetaData() + metadata_path = util.join_path(pkg_path, ctx.const.metadata_xml) + m.read(metadata_path) + for pcomar in m.package.providesComar: + scriptPath = util.join_path(pkg_path, ctx.const.comar_dir, pcomar.script) - comariface.register(pcomar, x, scriptPath) - comariface.run_postinstall(x) + comariface.register(pcomar, x, scriptPath) + comariface.run_postinstall(x) ctx.installdb.clear_pending(x) except ImportError: raise Error(_("COMAR: comard not fully installed")) diff --git a/pisi/installdb.py b/pisi/installdb.py index 36547df2..dc6e1f1f 100644 --- a/pisi/installdb.py +++ b/pisi/installdb.py @@ -155,8 +155,9 @@ class InstallDB: def clear_pending(self, pkg): pkg = str(pkg) info = self.d[pkg] - assert info.state == 'ip' - info.state = 'i' + if self.is_installed(pkg): + assert info.state == 'ip' + info.state = 'i' self.d[pkg] = info del self.dp[pkg]