summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeCache.py
diff options
context:
space:
mode:
Diffstat (limited to 'DistUpgrade/DistUpgradeCache.py')
-rw-r--r--DistUpgrade/DistUpgradeCache.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py
index 1d5fad53..00c0013b 100644
--- a/DistUpgrade/DistUpgradeCache.py
+++ b/DistUpgrade/DistUpgradeCache.py
@@ -114,26 +114,26 @@ class MyCache(apt.Cache):
def keepInstalledRule(self):
""" run after the dist-upgrade to ensure that certain
packages are kept installed """
- def keepInstalled(self, pkgname):
+ def keepInstalled(self, pkgname, reason):
if (self.has_key(pkgname)
and self[pkgname].isInstalled
and self[pkgname].markedDelete):
- self[pkgname].markInstall()
+ self.markInstall(pkgname, reason)
# first the global list
for pkgname in self.config.getlist("Distro","KeepInstalledPkgs"):
- keepInstalled(self, pkgname)
+ keepInstalled(self, pkgname, "Distro KeepInstalledPkgs rule")
# the the per-metapkg rules
for key in self.metapkgs:
if self.has_key(key) and (self[key].isInstalled or
self[key].markedInstall):
for pkgname in self.config.getlist(key,"KeepInstalledPkgs"):
- keepInstalled(self, pkgname)
+ keepInstalled(self, pkgname, "%s KeepInstalledPkgs rule" % key)
# now the keepInstalledSection code
for section in self.config.getlist("Distro","KeepInstalledSection"):
for pkg in self:
if pkg.markedDelete and pkg.section == section:
- keepInstalled(self, pkgname)
+ keepInstalled(self, pkgname, "Distro KeepInstalledSection rule: %s" % section)
# the the per-metapkg rules
for key in self.metapkgs:
if self.has_key(key) and (self[key].isInstalled or
@@ -141,7 +141,7 @@ class MyCache(apt.Cache):
for section in self.config.getlist(key,"KeepInstalledSection"):
for pkg in self:
if pkg.markedDelete and pkg.section == section:
- keepInstalled(self, pkgname)
+ keepInstalled(self, pkgname, "%s KeepInstalledSection rule: %s" % (key, section))
def postUpgradeRule(self):