diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-02-06 10:38:09 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-02-06 10:38:09 +0100 |
| commit | 7520aea4b9ea79e180aa9dca5eed719158b70d91 (patch) | |
| tree | 58897c0bf74e68970643bff5eb85a47b5e4e4470 /DistUpgrade/DistUpgradeCache.py | |
| parent | 6164b21e46fbd5b56b7c8245f577c137bda9ba11 (diff) | |
| parent | f593c02a4051313dd0044888a26d7ab3f4ba1133 (diff) | |
| download | python-apt-7520aea4b9ea79e180aa9dca5eed719158b70d91.tar.gz | |
* merged from the laptop branch
Diffstat (limited to 'DistUpgrade/DistUpgradeCache.py')
| -rw-r--r-- | DistUpgrade/DistUpgradeCache.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index c7cb89f3..2836d297 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -5,6 +5,7 @@ import os import re import logging from gettext import gettext as _ +from DistUpgradeConfigParser import DistUpgradeConfig class MyCache(apt.Cache): # init @@ -12,6 +13,9 @@ class MyCache(apt.Cache): apt.Cache.__init__(self, progress) self.to_install = [] self.to_remove = [] + + self.config = DistUpgradeConfig() + # turn on debuging apt_pkg.Config.Set("Debug::pkgProblemResolver","true") fd = os.open(os.path.expanduser("~/dist-upgrade-apt.log"), os.O_RDWR|os.O_CREAT|os.O_TRUNC) @@ -161,14 +165,12 @@ class MyCache(apt.Cache): return metapkg_found # now check for ubuntu-desktop, kubuntu-desktop, edubuntu-desktop - metapkgs = {"ubuntu-desktop": ["gdm","gnome-panel", "ubuntu-artwork"], - "kubuntu-desktop": ["kdm", "kicker", - "kubuntu-artwork-usplash"], - "edubuntu-desktop": ["edubuntu-artwork", "tuxpaint"] - } + metapkgs = self.config.getlist("Distro","MetaPkgs") # we never go without ubuntu-base - self["ubuntu-base"].markInstall() + for pkg in self.config.getlist("Distro","BaseMetaPkgs"): + self[pkg].markInstall() + # every meta-pkg that is installed currently, will be marked # install (that result in a upgrade and removes a markDelete) for key in metapkgs: @@ -182,7 +184,7 @@ class MyCache(apt.Cache): logging.debug("no {ubuntu,edubuntu,kubuntu}-desktop pkg installed") for key in metapkgs: deps_found = True - for pkg in metapkgs[key]: + for pkg in self.config.getlist(key,"KeyDependencies"): deps_found &= self.has_key(pkg) and self[pkg].isInstalled if deps_found: logging.debug("guessing '%s' as missing meta-pkg" % key) @@ -208,8 +210,6 @@ class MyCache(apt.Cache): "above first using synaptic or " "apt-get before proceeding.")) return False - - # FIXME: check for ubuntu-desktop, kubuntu-dekstop, edubuntu-desktop return True def _inRemovalBlacklist(self, pkgname): |
