summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeCache.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-02-08 10:38:21 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2006-02-08 10:38:21 +0100
commitffece636d93a716f92765625a119433fa7b2073b (patch)
treeace135c0fe6cd4e4d17122a3cb31ea8fe8c5b642 /DistUpgrade/DistUpgradeCache.py
parent6e594d7dc24ee6e91a7294e7051218b044ea76f7 (diff)
downloadpython-apt-ffece636d93a716f92765625a119433fa7b2073b.tar.gz
* DistUpgrade/DistUpgradeViewGtk.py:
- make the sleep even smaller * DistUpgrade/DistUpgradeCache.py: - change the order in wich the PostUpgradeRule is run
Diffstat (limited to 'DistUpgrade/DistUpgradeCache.py')
-rw-r--r--DistUpgrade/DistUpgradeCache.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py
index b20c9f77..ab7e24a4 100644
--- a/DistUpgrade/DistUpgradeCache.py
+++ b/DistUpgrade/DistUpgradeCache.py
@@ -120,7 +120,8 @@ class MyCache(apt.Cache):
for pkg in self.config.getlist("Distro","PostUpgrade%s" % rule):
action(pkg, "Distro PostUpgrade%s rule" % rule)
for key in self.metapkgs:
- if self.has_key(key) and self[key].isInstalled:
+ if self.has_key(key) and (self[key].isInstalled or
+ self[key].markedInstall):
for pkg in self.config.getlist(key,"PostUpgrade%s" % rule):
action(pkg, "%s PostUpgrade%s rule" % (key, rule))
@@ -128,10 +129,15 @@ class MyCache(apt.Cache):
try:
# upgrade (and make sure this way that the cache is ok)
self.upgrade(True)
- self.postUpgradeRule()
-
+
+ # then see if meta-pkgs are missing
if not self._installMetaPkgs(view):
raise SystemError, _("Can't upgrade required meta-packages")
+
+ # and if we have some special rules
+ self.postUpgradeRule()
+
+ # see if it all makes sense
if not self._verifyChanges():
raise SystemError, _("A essential package would have to be removed")
except SystemError, e: