eğer paket bir şekilde (mesela bypass-safety ile) kaldırılmış ama post-install'u çalıştırılmamışsa çalıştırmaya çalışma ve pending listesinden sil

This commit is contained in:
S.Çağlar Onur
2005-11-24 19:52:02 +00:00
parent 3bc508c8b9
commit 057d321ea8
2 changed files with 14 additions and 12 deletions
+11 -10
View File
@@ -176,22 +176,23 @@ def configure_pending():
try: try:
import pisi.comariface as comariface import pisi.comariface as comariface
for x in order: for x in order:
pkginfo = A[x] if ctx.installdb.is_installed(x):
pkgname = util.package_name(x, pkginfo.version, pkginfo = A[x]
pkgname = util.package_name(x, pkginfo.version,
pkginfo.release, pkginfo.release,
False, False,
False) False)
pkg_path = util.join_path(ctx.config.lib_dir(), pkg_path = util.join_path(ctx.config.lib_dir(),
pkgname) 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)
for pcomar in m.package.providesComar: for pcomar in m.package.providesComar:
scriptPath = util.join_path(pkg_path, scriptPath = util.join_path(pkg_path,
ctx.const.comar_dir, ctx.const.comar_dir,
pcomar.script) pcomar.script)
comariface.register(pcomar, x, scriptPath) comariface.register(pcomar, x, scriptPath)
comariface.run_postinstall(x) comariface.run_postinstall(x)
ctx.installdb.clear_pending(x) ctx.installdb.clear_pending(x)
except ImportError: except ImportError:
raise Error(_("COMAR: comard not fully installed")) raise Error(_("COMAR: comard not fully installed"))
+3 -2
View File
@@ -155,8 +155,9 @@ class InstallDB:
def clear_pending(self, pkg): def clear_pending(self, pkg):
pkg = str(pkg) pkg = str(pkg)
info = self.d[pkg] info = self.d[pkg]
assert info.state == 'ip' if self.is_installed(pkg):
info.state = 'i' assert info.state == 'ip'
info.state = 'i'
self.d[pkg] = info self.d[pkg] = info
del self.dp[pkg] del self.dp[pkg]