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/DistUpgradeCache.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'DistUpgrade/DistUpgradeCache.py') 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