From e1a1eeefa2d7a681f6583b7520031fd71daad862 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 29 Sep 2006 21:37:18 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - added edgyQuirks handling for python transition --- DistUpgrade/DistUpgradeCache.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 318c30cd..e5b7ed09 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -164,6 +164,22 @@ class MyCache(apt.Cache): if func is not None: func() + def edgyQuirks(self): + """ this function works around quirks in the dapper->edgy upgrade """ + logging.debug("running edgyQuirks handler") + for pkg in self: + if (pkg.name.startswith("python2.4") and + pkg.isInstalled and + not pkg.markedUpgrade): + newpkg = "python-"+pkg.name[len("python2.4"):-1] + if (self.has_key(newpkg) and + not self[newpkg].markedInstall): + try: + self.markInstall(pkg.name, + "python2.4->python upgrade rule") + except SystemError, e: + logging.debug("Failed to install: %s (%s)" % (newpkg, e)) + def dapperQuirks(self): """ this function works around quirks in the breezy->dapper upgrade """ logging.debug("running dapperQuirks handler") -- cgit v1.2.3 From f7dc0ba8a869e8cbf1807bb90da82e540291806f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 29 Sep 2006 22:34:54 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - make the edgyQuirks work for the python2.4->python transition --- DistUpgrade/DistUpgradeCache.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index e5b7ed09..6dd1983d 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -167,18 +167,18 @@ class MyCache(apt.Cache): def edgyQuirks(self): """ this function works around quirks in the dapper->edgy upgrade """ logging.debug("running edgyQuirks handler") + # deal with the python2.4-$foo -> python-$foo transition for pkg in self: - if (pkg.name.startswith("python2.4") and + if (pkg.name.startswith("python2.4-") and pkg.isInstalled and not pkg.markedUpgrade): - newpkg = "python-"+pkg.name[len("python2.4"):-1] - if (self.has_key(newpkg) and - not self[newpkg].markedInstall): + basepkg = "python-"+pkg.name[len("python2.4-"):] + if (self.has_key(basepkg) and not self[basepkg].markedInstall): try: - self.markInstall(pkg.name, + self.markInstall(basepkg, "python2.4->python upgrade rule") except SystemError, e: - logging.debug("Failed to install: %s (%s)" % (newpkg, e)) + logging.debug("Failed to apply python2.4->python install: %s (%s)" % (newpkg, e)) def dapperQuirks(self): """ this function works around quirks in the breezy->dapper upgrade """ -- cgit v1.2.3 From 588cd00384f0ac4de95a56d28f248f2298b05fbc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 29 Sep 2006 22:55:44 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - hpijs quirk --- DistUpgrade/DistUpgradeCache.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 6dd1983d..7b91f4ed 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -179,6 +179,15 @@ class MyCache(apt.Cache): "python2.4->python upgrade rule") except SystemError, e: logging.debug("Failed to apply python2.4->python install: %s (%s)" % (newpkg, e)) + # deal with $§$/&$ hpijs + if (self.has_key("hpijs") and self["hpijs"].isInstalled and + not self["hpijs"].markedUpgrade): + try: + self.markInstall("hpijs","hpijs quirk upgrade rule") + except SystemError, e: + logging.debug("Failed to apply hpijs install (%s)" % e) + + def dapperQuirks(self): """ this function works around quirks in the breezy->dapper upgrade """ -- cgit v1.2.3 From 359989e5177a6c376380d6d00003b5ea19403f0e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 00:13:27 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - fixed comment --- DistUpgrade/DistUpgradeCache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 7b91f4ed..453efe92 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -179,7 +179,7 @@ class MyCache(apt.Cache): "python2.4->python upgrade rule") except SystemError, e: logging.debug("Failed to apply python2.4->python install: %s (%s)" % (newpkg, e)) - # deal with $§$/&$ hpijs + # deal with *gar*gar* hpijs if (self.has_key("hpijs") and self["hpijs"].isInstalled and not self["hpijs"].markedUpgrade): try: -- cgit v1.2.3 From e6caff1e5bb222d50cb7a521f1ebee723ac1fc9d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 00:31:48 +0200 Subject: * changelog updates, uploaded --- DistUpgrade/DistUpgradeCache.py | 1 - debian/changelog | 22 +++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 453efe92..3d10c707 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -1,7 +1,6 @@ import warnings warnings.filterwarnings("ignore", "apt API not stable yet", FutureWarning) -warnings.filterwarnings("ignore", "apt API not stable yet", FutureWarning) import apt import apt_pkg import os diff --git a/debian/changelog b/debian/changelog index 8bc27537..3b83d42f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,26 +1,18 @@ -update-manager (0.44.15) edgy; urgency=low +update-manager (0.44.13) edgy; urgency=low + * fix missing i18n declarations (lp: #62519) * data/glade/SoftwareProperties.glade: - fix missing "translatable" property (lp: #62681) - * missing i18n added (lp: 62519) - - -- - -update-manager (0.44.14) edgy; urgency=low - + * DistUpgrade: + - deal better with the python transition and the hpijs + upgrade (lp: #62948) * UpdateManager/UpdateManager.py: - put the cancel button inside the text-area to avoid flickering - * DistUprade/DistUpgradeControler.py: - - check for self.sources, self.aptcdrom before using it (lp: #61852) - - -- Michael Vogt Tue, 26 Sep 2006 23:17:27 +0200 - -update-manager (0.44.13) edgy; urgency=low - - * UpdateManager/UpdateManager.py: - make sure that src_ver is always initialized (thanks to Simira for reporting) - filter python-apt future warning (especially for seb128) + * DistUprade/DistUpgradeControler.py: + - check for self.sources, self.aptcdrom before using it (lp: #61852) -- Michael Vogt Sat, 23 Sep 2006 00:53:06 +0200 -- cgit v1.2.3 From 533db41cd76a89a2a893c00980e537d3af34c769 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 4 Oct 2006 12:45:51 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - fix incorrect variable name --- DistUpgrade/DistUpgradeCache.py | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 3d10c707..01305d32 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -177,7 +177,7 @@ class MyCache(apt.Cache): self.markInstall(basepkg, "python2.4->python upgrade rule") except SystemError, e: - logging.debug("Failed to apply python2.4->python install: %s (%s)" % (newpkg, e)) + logging.debug("Failed to apply python2.4->python install: %s (%s)" % (basepkg, e)) # deal with *gar*gar* hpijs if (self.has_key("hpijs") and self["hpijs"].isInstalled and not self["hpijs"].markedUpgrade): diff --git a/debian/changelog b/debian/changelog index eecc7ff5..8a5fe80a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ update-manager (0.44.15) edgy; urgency=low from breezy->dapper) (lp: #63881) * do not come up with bogus dist-upgrade suggestions * fix bad english grammar (lp: #63761) + * fix in the edgyUpdates quirks handler (lp: #63723) -- -- cgit v1.2.3 From e6d17f29049c81ea4064dd928b026ef68726354d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 4 Oct 2006 13:17:16 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - catch systemerror exceptions in _tryMarkObsoleteForRemoval() --- DistUpgrade/DistUpgradeCache.py | 23 ++++++++++++++--------- debian/changelog | 1 + 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 01305d32..1a7911c0 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -307,8 +307,8 @@ class MyCache(apt.Cache): logging.debug("guessing '%s' as missing meta-pkg" % key) try: self[key].markInstall() - except SystemError: - logging.error("failed to mark '%s' for install" % key) + except SystemError, e: + logging.error("failed to mark '%s' for install (%s)" % (key,e)) view.error(_("Can't install '%s'" % key), _("It was impossible to install a " "required package. Please report " @@ -340,13 +340,18 @@ class MyCache(apt.Cache): # if it dosn't remove other packages depending on it # that are not obsolete as well self.create_snapshot() - self[pkgname].markDelete() - for pkg in self.getChanges(): - if pkg.name not in remove_candidates or \ - pkg.name in foreign_pkgs or \ - self._inRemovalBlacklist(pkg.name): - self.restore_snapshot() - return False + try: + self[pkgname].markDelete() + for pkg in self.getChanges(): + if pkg.name not in remove_candidates or \ + pkg.name in foreign_pkgs or \ + self._inRemovalBlacklist(pkg.name): + self.restore_snapshot() + return False + except SystemError,e: + loggging.warning("_tryMarkObsoleteForRemoval failed for '%s' (%s)" % (pkgname,e)) + self.restore_snapshot() + return False return True def _getObsoletesPkgs(self): diff --git a/debian/changelog b/debian/changelog index 8a5fe80a..c078cfc8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ update-manager (0.44.15) edgy; urgency=low * do not come up with bogus dist-upgrade suggestions * fix bad english grammar (lp: #63761) * fix in the edgyUpdates quirks handler (lp: #63723) + * catch error from _tryMarkObsoleteForRemoval() (lp: #63617) -- -- cgit v1.2.3 From 3371259be1e936405b16bc447d6e90aab4809f81 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 4 Oct 2006 20:55:22 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - protect against KeyErrors as well --- DistUpgrade/DistUpgradeCache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 1a7911c0..7d0d27e0 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -348,7 +348,7 @@ class MyCache(apt.Cache): self._inRemovalBlacklist(pkg.name): self.restore_snapshot() return False - except SystemError,e: + except (SystemError,KeyError),e: loggging.warning("_tryMarkObsoleteForRemoval failed for '%s' (%s)" % (pkgname,e)) self.restore_snapshot() return False -- cgit v1.2.3