summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-06-01 13:52:03 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-06-01 13:52:03 +0200
commit06b60b3c814cc5458683a9b31812fa5c8719163d (patch)
treec185ed970df0ced84d42f1929b302ab4c6442703
parent6f4cd12b0f5ac7d6bed84e72a583c923dcf82fda (diff)
downloadpython-apt-06b60b3c814cc5458683a9b31812fa5c8719163d.tar.gz
* DistUpgrade/DistUpgradeCache.py:
- added quirks handler for the nvidia-glx upgrade issue
-rw-r--r--DistUpgrade/Changelog1
-rw-r--r--DistUpgrade/DistUpgradeCache.py15
2 files changed, 16 insertions, 0 deletions
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)