summaryrefslogtreecommitdiffstats
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-03 16:01:29 -0500
commitba3de50daec47f9caf21b46017423ffc99955cb8 (patch)
treed5a418546ebe4d98071b3bcbac4b3495d40c2416
parent8720a9ea7e3676c8c8332a9d43d0070a6ae86c86 (diff)
downloadbcfg2-ba3de50daec47f9caf21b46017423ffc99955cb8.tar.gz
bcfg2-ba3de50daec47f9caf21b46017423ffc99955cb8.tar.bz2
bcfg2-ba3de50daec47f9caf21b46017423ffc99955cb8.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> (cherry picked from commit 53a383ab2afcbcac748b5387cbfb786feb5f7acf)
-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 077d71508..009c9a3a1 100644
--- a/src/lib/Client/Tools/YUMng.py
+++ b/src/lib/Client/Tools/YUMng.py
@@ -205,6 +205,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:
@@ -220,6 +222,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
@@ -427,6 +430,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
@@ -495,6 +500,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 != []: