diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-02-08 10:38:21 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-02-08 10:38:21 +0100 |
| commit | ffece636d93a716f92765625a119433fa7b2073b (patch) | |
| tree | ace135c0fe6cd4e4d17122a3cb31ea8fe8c5b642 | |
| parent | 6e594d7dc24ee6e91a7294e7051218b044ea76f7 (diff) | |
| download | python-apt-ffece636d93a716f92765625a119433fa7b2073b.tar.gz | |
* DistUpgrade/DistUpgradeViewGtk.py:
- make the sleep even smaller
* DistUpgrade/DistUpgradeCache.py:
- change the order in wich the PostUpgradeRule is run
| -rw-r--r-- | DistUpgrade/DistUpgradeCache.py | 12 | ||||
| -rw-r--r-- | 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): |
