summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-05-28 03:24:35 +0200
committerSol Jerome <sol.jerome@gmail.com>2014-07-28 12:33:07 -0500
commitd801c47773ce108de79f008f4a17b774476b0549 (patch)
tree37a4ddbcc6c7f84589621750133554c95f6f4b9e
parentd0c08263a701a7303ad2ab7d3e752f62932eeb94 (diff)
downloadbcfg2-d801c47773ce108de79f008f4a17b774476b0549.tar.gz
bcfg2-d801c47773ce108de79f008f4a17b774476b0549.tar.bz2
bcfg2-d801c47773ce108de79f008f4a17b774476b0549.zip
Packages/Apt: Essential could be "no"
The "Essential" field in the package control fields could be "yes" or "no". Only yes sould define the package as essential. The value "no" sould be handled same as not having the field at all.
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Apt.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py b/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py
index 27a725f23..4a78f846f 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py
@@ -107,7 +107,8 @@ class AptSource(Source):
self.pkgnames.add(pkgname)
bdeps[barch][pkgname] = []
elif words[0] == 'Essential' and self.essential:
- self.essentialpkgs.add(pkgname)
+ if words[1].strip() == 'yes':
+ self.essentialpkgs.add(pkgname)
elif words[0] in depfnames:
vindex = 0
for dep in words[1].split(','):