From 06b60b3c814cc5458683a9b31812fa5c8719163d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 1 Jun 2006 13:52:03 +0200 Subject: * DistUpgrade/DistUpgradeCache.py: - added quirks handler for the nvidia-glx upgrade issue --- DistUpgrade/Changelog | 1 + DistUpgrade/DistUpgradeCache.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog index 14dec6c3..671f43c2 100644 --- a/DistUpgrade/Changelog +++ b/DistUpgrade/Changelog @@ -4,6 +4,7 @@ - updated translations - fix a missing bindtextdomain - fix a incorrect ngettext usage + - added quirks handler to fix nvidia-glx issue (#47433) 2006-05-24: - if the initial "update()" fails, just exit, don't try to restore the old sources.list (nothing was modified yet) diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index c9cdfad3..b360daac 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -125,6 +125,21 @@ class MyCache(apt.Cache): for pkg in self.config.getlist(key,"PostUpgrade%s" % rule): action(pkg, "%s PostUpgrade%s rule" % (key, rule)) + # get the distro-specific quirks handler and run it + quirksFunc = "%sQuirks" % self.config.get("Sources","To") + if quirksFunc in dir(self): + eval("self.%s()"%quirksFunc) + + + def dapperQuirks(self): + """ this function works around quirks in the breezy dapper upgrade """ + logging.debug("running dapperQuirks handler") + if self.has_key("nvidia-glx") and self["nvidia-glx"].isInstalled: + if self.has_key("nvidia-settings") and self["nvidia-settings"].isInstalled: + self.debug("nvidia-settings and nvidia-glx is installed") + self.markRemove("nvidia-settings") + self.markInstall("nvidia-glx") + def distUpgrade(self, view): try: # upgrade (and make sure this way that the cache is ok) -- cgit v1.2.3