diff options
| -rw-r--r-- | DistUpgrade/DistUpgrade.cfg | 1 | ||||
| -rw-r--r-- | DistUpgrade/DistUpgradeCache.py | 4 | ||||
| -rw-r--r-- | DistUpgrade/README | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/DistUpgrade/DistUpgrade.cfg b/DistUpgrade/DistUpgrade.cfg index f063840d..02a77564 100644 --- a/DistUpgrade/DistUpgrade.cfg +++ b/DistUpgrade/DistUpgrade.cfg @@ -9,6 +9,7 @@ MetaPkgs=ubuntu-desktop, kubuntu-desktop, edubuntu-desktop, xubuntu-desktop BaseMetaPkgs=ubuntu-minimal PostUpgradePurge=xorg-common, libgl1-mesa Demotions=demoted.cfg +RemoveEssentialOk=sysvinit # information about the individual meta-pkgs [ubuntu-desktop] diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 37dd96db..1f53b6be 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -197,11 +197,13 @@ class MyCache(apt.Cache): """ this function tests if the current changes don't violate our constrains (blacklisted removals etc) """ + removeEssentialOk = self.config.getlist("Distro","RemoveEssentialOk") for pkg in self.getChanges(): if pkg.markedDelete and self._inRemovalBlacklist(pkg.name): logging.debug("The package '%s' is marked for removal but it's in the removal blacklist", pkg.name) return False - if pkg.markedDelete and pkg._pkg.Essential == True: + if pkg.markedDelete and (pkg._pkg.Essential == True and + not pkg.name in removeEssentialOk): logging.debug("The package '%s' is marked for removal but it's a ESSENTIAL package", pkg.name) return False return True diff --git a/DistUpgrade/README b/DistUpgrade/README index 9d408f43..60c761d6 100644 --- a/DistUpgrade/README +++ b/DistUpgrade/README @@ -30,6 +30,8 @@ PostUpgrade{Install,Remove,Purge}: ForcedObsoletes: Obsolete packages that the user is asked about after the upgrade (marking happens *after* the cache.commit()) +RemoveEssentialOk: + Those packages are ok to remove even though they are essential [$meta-pkg] KeyDependencies: |
