summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2010-11-02 18:46:23 -0500
committerSol Jerome <sol.jerome@gmail.com>2010-11-02 20:35:19 -0500
commitd1a2629b426c94d0ccc1ba60c2c0c49e940a6d88 (patch)
tree2869b8e9984bf661bc540fedb8764d6556b17bfb /src
parentdd0168f42a2efddecec09c51313899ea7b3b39ec (diff)
downloadbcfg2-d1a2629b426c94d0ccc1ba60c2c0c49e940a6d88.tar.gz
bcfg2-d1a2629b426c94d0ccc1ba60c2c0c49e940a6d88.tar.bz2
bcfg2-d1a2629b426c94d0ccc1ba60c2c0c49e940a6d88.zip
YUMng: Sync Joe Digilio's patch over from svn
Jack Neely's commit message: Add a patch from Joe Digilio to include a verify_flags knob. I've added a line to also load this from the config file, and log in debug mode. Specifying 'verify_flags' with an Instance will override the values from the config file. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Tools/YUMng.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py
index 9cdcdca40..f0d906717 100644
--- a/src/lib/Client/Tools/YUMng.py
+++ b/src/lib/Client/Tools/YUMng.py
@@ -210,6 +210,8 @@ class YUMng(Bcfg2.Client.Tools.PkgTool):
"version_fail_action", "upgrade").lower() == "upgrade"
self.doReinst = CP.get(self.name, "verify_fail_action",
"reinstall").lower() == "reinstall"
+ self.verifyFlags = CP.get(self.name, "verify_flags",
+ "").lower().replace(' ', ',')
self.installOnlyPkgs = self.yb.conf.installonlypkgs
if 'gpg-pubkey' not in self.installOnlyPkgs:
@@ -225,6 +227,7 @@ class YUMng(Bcfg2.Client.Tools.PkgTool):
% self.doReinst)
self.logger.debug("YUMng: installOnlyPkgs: %s" \
% str(self.installOnlyPkgs))
+ self.logger.debug("YUMng: verify_flags: %s" % self.verifyFlags)
def _fixAutoVersion(self, entry):
# old style entry; synthesize Instances from current installed
@@ -436,6 +439,8 @@ class YUMng(Bcfg2.Client.Tools.PkgTool):
stat['verify_fail'] = False
stat['pkg'] = entry
stat['modlist'] = modlist
+ verify_flags = inst.get('verify_flags', self.verifyFlags)
+ verify_flags = verify_flags.lower().replace(' ', ',').split(',')
if len(POs) == 0:
# Package not installed
@@ -505,6 +510,8 @@ class YUMng(Bcfg2.Client.Tools.PkgTool):
for p in probs:
if p.type == 'missing' and os.path.islink(fn):
continue
+ elif 'no' + p.type in verify_flags:
+ continue
if p.type not in ['missingok', 'ghost']:
tmp.append((p.type, p.message))
if tmp != []: