From ba0fc9a5fc32bc7f43aa6043a7f05a5145e432f8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 10 Oct 2006 18:57:13 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - run the postUpgradeRules() after the upgrade and before trying to install any missing meta-packages --- DistUpgrade/DistUpgradeCache.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 7d0d27e0..2e21d05d 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -202,16 +202,16 @@ class MyCache(apt.Cache): # upgrade (and make sure this way that the cache is ok) self.upgrade(True) - # then see if meta-pkgs are missing - if not self._installMetaPkgs(view): - raise SystemError, _("Can't upgrade required meta-packages") - # see if our KeepInstalled rules are honored self.keepInstalledRule() # and if we have some special rules self.postUpgradeRule() + # then see if meta-pkgs are missing + if not self._installMetaPkgs(view): + raise SystemError, _("Can't upgrade required meta-packages") + # see if it all makes sense if not self._verifyChanges(): raise SystemError, _("A essential package would have to be removed") -- cgit v1.2.3 From d1b8c72ce90713b807bc231b949494e19867b789 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 12 Oct 2006 11:18:07 +0200 Subject: * typo fix --- 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 2e21d05d..f6e6cad8 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -349,7 +349,7 @@ class MyCache(apt.Cache): self.restore_snapshot() return False except (SystemError,KeyError),e: - loggging.warning("_tryMarkObsoleteForRemoval failed for '%s' (%s)" % (pkgname,e)) + logging.warning("_tryMarkObsoleteForRemoval failed for '%s' (%s)" % (pkgname,e)) self.restore_snapshot() return False return True -- cgit v1.2.3 From 0bc703a0d36d8c99ac8ec9118111627623c006da Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 17 Oct 2006 18:13:16 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - add quirks handler for xserver-xorg-input-* and bzr --- DistUpgrade/DistUpgradeCache.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index f6e6cad8..bc79f9e2 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -166,8 +166,8 @@ 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: + # deal with the python2.4-$foo -> python-$foo transition if (pkg.name.startswith("python2.4-") and pkg.isInstalled and not pkg.markedUpgrade): @@ -178,14 +178,23 @@ class MyCache(apt.Cache): "python2.4->python upgrade rule") except SystemError, 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): - try: - self.markInstall("hpijs","hpijs quirk upgrade rule") - except SystemError, e: - logging.debug("Failed to apply hpijs install (%s)" % e) + # xserver-xorg-input-$foo gives us trouble during the upgrade too + if (pkg.name.startswith("xserver-xorg-input-") and + pkg.isInstalled and + not pkg.markedUpgrade): + try: + self.markInstall(pkg.name, "xserver-xorg-input fixup rule") + except SystemError, e: + logging.debug("Failed to apply %s fixup: %s (%s)" % (pkg.name, e)) + # deal with held-backs that are unneeded + for pkgname in ["hpijs", "bzr"]: + if (self.has_key(pkgname) and self[pkgname].isInstalled and + not self[pkgname].markedUpgrade): + try: + self.markInstall(pkgname,"%s quirk upgrade rule" % pkgname) + except SystemError, e: + logging.debug("Failed to apply %s install (%s)" % (pkgname,e)) def dapperQuirks(self): -- cgit v1.2.3 From 75af4477ee82dd7782b064bfe425e49356701cac Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 17 Oct 2006 19:08:03 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - fix tomboy while we are at it anyway --- DistUpgrade/Changelog | 3 ++- DistUpgrade/DistUpgradeCache.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog index 050fc615..45ef5edf 100644 --- a/DistUpgrade/Changelog +++ b/DistUpgrade/Changelog @@ -1,5 +1,6 @@ 2006-10-17: - - ensure bzr and xserver-xorg-input-* is properly upgraded + - ensure bzr, tomboy and xserver-xorg-input-* are properly + upgraded - don't fail if dpkg sents unexpected status lines (lp: #66013) 2006-10-16: - remove leftover references to ubuntu-base and diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index bc79f9e2..a569bf37 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -188,7 +188,7 @@ class MyCache(apt.Cache): logging.debug("Failed to apply %s fixup: %s (%s)" % (pkg.name, e)) # deal with held-backs that are unneeded - for pkgname in ["hpijs", "bzr"]: + for pkgname in ["hpijs", "bzr", "tomboy"]: if (self.has_key(pkgname) and self[pkgname].isInstalled and not self[pkgname].markedUpgrade): try: -- cgit v1.2.3 From 1d27a9d8320275e936278b4a2f779f4371e60519 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 21 Oct 2006 14:20:05 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - fix incorrect format in logging --- DistUpgrade/Changelog | 2 ++ DistUpgrade/DistUpgradeCache.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog index 45ef5edf..6cb6a7df 100644 --- a/DistUpgrade/Changelog +++ b/DistUpgrade/Changelog @@ -1,3 +1,5 @@ +2006-10-21: + - fix incorrect arguments in fixup logging (lp: #67311) 2006-10-17: - ensure bzr, tomboy and xserver-xorg-input-* are properly upgraded diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index a569bf37..7df0b510 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -185,7 +185,7 @@ class MyCache(apt.Cache): try: self.markInstall(pkg.name, "xserver-xorg-input fixup rule") except SystemError, e: - logging.debug("Failed to apply %s fixup: %s (%s)" % (pkg.name, e)) + logging.debug("Failed to apply fixup: %s (%s)" % (pkg.name, e)) # deal with held-backs that are unneeded for pkgname in ["hpijs", "bzr", "tomboy"]: -- cgit v1.2.3 From ae8796907bc0d690057bc661ca926dd6bc4554cc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 23 Oct 2006 13:59:18 +0200 Subject: * force downgrade of libgl1-mesa-dri package if unofficial compiz packages are installed (lp: #58424) --- DistUpgrade/Changelog | 3 +++ DistUpgrade/DistUpgradeCache.py | 27 ++++++++++++++++++++++++++- DistUpgrade/DistUpgradeView.py | 6 ++++-- 3 files changed, 33 insertions(+), 3 deletions(-) (limited to 'DistUpgrade/DistUpgradeCache.py') 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 -- cgit v1.2.3 From dcee921a1107db6e5c8042598641b422a77e24c2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 26 Oct 2006 12:31:52 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - ensure that xserver-xorg-video-all is upgraded (if xserver-xorg-driver-all is installed) --- DistUpgrade/Changelog | 3 +++ DistUpgrade/DistUpgradeCache.py | 11 +++++++++++ 2 files changed, 14 insertions(+) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog index bea2b932..b42e2d76 100644 --- a/DistUpgrade/Changelog +++ b/DistUpgrade/Changelog @@ -1,3 +1,6 @@ +2006-10-26: + - make sure that xserver-xorg-video-all get installed if + xserver-xorg-driver-all was installed before (lp: #58424) 2006-10-21: - comment out old cdrom sources - demotions updated diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 9c062c41..d9dc9959 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -212,6 +212,17 @@ class MyCache(apt.Cache): logging.info("Forcing downgrade of libgl1-mesa-dri for xgl.compz.info installs") self._depcache.SetCandidateVer(pkg._pkg, ver) break + + # deal with general if $foo is installed, install $bar + for (fr, to) in [("xserver-xorg-driver-all","xserver-xorg-video-all")]: + if self.has_key(fr) and self.has_key(to): + if self[fr].isInstalled and not self[to].markedInstall: + try: + self.markInstall(to,"%s->%s quirk upgrade rule" % (fr, to)) + except SystemError, e: + logging.debug("Failed to apply %s->%s install (%s)" % (fr, to, e)) + + def dapperQuirks(self): """ this function works around quirks in the breezy->dapper upgrade """ -- cgit v1.2.3