summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-29 21:37:18 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-29 21:37:18 +0200
commite1a1eeefa2d7a681f6583b7520031fd71daad862 (patch)
treed10942de0b3e68e60ee310f968952c7b0d2897d9
parent44bb7423ea89e0174fd33108bc1112677283114e (diff)
downloadpython-apt-e1a1eeefa2d7a681f6583b7520031fd71daad862.tar.gz
* DistUpgrade/DistUpgradeCache.py:
- added edgyQuirks handling for python transition
-rw-r--r--DistUpgrade/DistUpgradeCache.py16
-rw-r--r--DistUpgrade/DistUpgradeControler.py2
2 files changed, 17 insertions, 1 deletions
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")
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index 7b255cf0..1d714325 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -644,7 +644,7 @@ class DistUpgradeControler(object):
else:
args.append("--without-network")
os.execve(sys.argv[0],args, os.environ)
-
+
# this is the core
def edgyUpgrade(self):
# sanity check (check for ubuntu-desktop, brokenCache etc)