summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/Changelog3
-rw-r--r--DistUpgrade/DistUpgradeCache.py27
-rw-r--r--DistUpgrade/DistUpgradeView.py6
3 files changed, 33 insertions, 3 deletions
diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog
index 6cb6a7df..15988e46 100644
--- a/DistUpgrade/Changelog
+++ b/DistUpgrade/Changelog
@@ -1,5 +1,8 @@
2006-10-21:
- fix incorrect arguments in fixup logging (lp: #67311)
+ - more error logging
+ - fix upgrade problems for people with unofficial compiz
+ repositories (lp: #58424)
2006-10-17:
- ensure bzr, tomboy and xserver-xorg-input-* are properly
upgraded
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py
index 7df0b510..9c062c41 100644
--- a/DistUpgrade/DistUpgradeCache.py
+++ b/DistUpgrade/DistUpgradeCache.py
@@ -195,7 +195,23 @@ class MyCache(apt.Cache):
self.markInstall(pkgname,"%s quirk upgrade rule" % pkgname)
except SystemError, e:
logging.debug("Failed to apply %s install (%s)" % (pkgname,e))
-
+ # libgl1-mesa-dri from xgl.compiz.info (and friends) breaks the
+ # upgrade, work around this here by downgrading the package
+ if self.has_key("libgl1-mesa-dri"):
+ pkg = self["libgl1-mesa-dri"]
+ # the version from the compiz repo has a "6.5.1+cvs20060824" ver
+ if (pkg.candidateVersion == pkg.installedVersion and
+ "+cvs2006" in pkg.candidateVersion):
+ for ver in pkg._pkg.VersionList:
+ # the "officual" edgy version has "6.5.1~20060817-0ubuntu3"
+ if "~2006" in ver.VerStr:
+ # ensure that it is from a trusted repo
+ for (VerFileIter, index) in ver.FileList:
+ indexfile = self._list.FindIndex(VerFileIter)
+ if indexfile and indexfile.IsTrusted:
+ logging.info("Forcing downgrade of libgl1-mesa-dri for xgl.compz.info installs")
+ self._depcache.SetCandidateVer(pkg._pkg, ver)
+ break
def dapperQuirks(self):
""" this function works around quirks in the breezy->dapper upgrade """
@@ -240,6 +256,15 @@ class MyCache(apt.Cache):
for pkg in self.getChanges():
if pkg.markedDelete:
continue
+ # special case because of a bug in pkg.candidateOrigin
+ if pkg.markedDowngrade:
+ for ver in pkg._pkg.VersionList:
+ # version is lower than installed one
+ if apt_pkg.VersionCompare(ver.VerStr, pkg.installedVersion) < 0:
+ for (verFileIter,index) in ver.FileList:
+ if not origin.trusted:
+ untrusted.append(pkg.name)
+ continue
origins = pkg.candidateOrigin
trusted = False
for origin in origins:
diff --git a/DistUpgrade/DistUpgradeView.py b/DistUpgrade/DistUpgradeView.py
index 40617774..109a278b 100644
--- a/DistUpgrade/DistUpgradeView.py
+++ b/DistUpgrade/DistUpgradeView.py
@@ -95,12 +95,14 @@ class DistUpgradeView(object):
self.toInstall = []
self.toUpgrade = []
self.toRemove = []
+ self.toDowngrade = []
for pkg in changes:
if pkg.markedInstall: self.toInstall.append(pkg.name)
elif pkg.markedUpgrade: self.toUpgrade.append(pkg.name)
elif pkg.markedDelete: self.toRemove.append(pkg.name)
- # no downgrades, re-installs
- assert(len(self.toInstall)+len(self.toUpgrade)+len(self.toRemove) == len(changes))
+ elif pkg.markedDowngrade: self.toDowngrade.append(pkg.name)
+ # no re-installs
+ assert(len(self.toInstall)+len(self.toUpgrade)+len(self.toRemove)+len(self.toDowngrade) == len(changes))
def askYesNoQuestion(self, summary, msg):
" ask a Yes/No question and return True on 'Yes' "
pass