From 2ac8bc88b2a27af0c120835e98889f1e44240b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Tue, 25 Oct 2005 11:41:09 +0000 Subject: [PATCH] * fix: clear pending state properly in database (thanks to caglar for showing me this, i've forgotten it) --- pisi/api.py | 1 + pisi/installdb.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/pisi/api.py b/pisi/api.py index 1856e567..d2c0d221 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -174,6 +174,7 @@ def configure_pending(): import pisi.comariface as comariface for x in order: 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 adb87bd1..11f63f87 100644 --- a/pisi/installdb.py +++ b/pisi/installdb.py @@ -148,6 +148,13 @@ class InstallDB: self.d[pkg] = InstallInfo(state, version, release, build, distro) + def clear_pending(self, pkg): + pkg = str(pkg) + info = self.d[pkg] + assert info.state == 'ip' + info.state = 'i' + self.d[pkg] = info + def remove(self, pkg): pkg = str(pkg) info = self.d[pkg]