From d1a2629b426c94d0ccc1ba60c2c0c49e940a6d88 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Tue, 2 Nov 2010 18:46:23 -0500 Subject: 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 --- src/lib/Client/Tools/YUMng.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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 != []: -- cgit v1.2.3-1-g7c22