From ffece636d93a716f92765625a119433fa7b2073b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 8 Feb 2006 10:38:21 +0100 Subject: * DistUpgrade/DistUpgradeViewGtk.py: - make the sleep even smaller * DistUpgrade/DistUpgradeCache.py: - change the order in wich the PostUpgradeRule is run --- DistUpgrade/DistUpgradeCache.py | 12 +++++++++--- DistUpgrade/DistUpgradeViewGtk.py | 2 +- 2 files changed, 10 insertions(+), 4 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: diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index b4ad4a0a..bf4acf0c 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -170,7 +170,7 @@ class GtkInstallProgressAdapter(InstallProgress): self.label_status.set_text(self.status) while gtk.events_pending(): gtk.main_iteration() - time.sleep(0.01) + time.sleep(0.001) class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): -- cgit v1.2.3