diff options
Diffstat (limited to 'src/lib/Client')
-rw-r--r-- | src/lib/Client/Tools/RPMng.py | 19 | ||||
-rw-r--r-- | src/lib/Client/Tools/YUMng.py | 4 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/RPMng.py b/src/lib/Client/Tools/RPMng.py index b8f09ed3e..06792ef13 100644 --- a/src/lib/Client/Tools/RPMng.py +++ b/src/lib/Client/Tools/RPMng.py @@ -42,6 +42,10 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): def __init__(self, logger, setup, config): Bcfg2.Client.Tools.PkgTool.__init__(self, logger, setup, config) + # create a global ignore list used when ignoring particular + # files during package verification + self.ignores = [entry.get('name') for struct in config for entry in struct \ + if entry.get('type') == 'ignore'] self.instance_status = {} self.extra_instances = [] self.modlists = {} @@ -364,7 +368,9 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): # Check the rpm verify file results against the modlist # and entry and per Instance Ignores. - ignores = [ig.get('name') for ig in entry.findall('Ignore')] + [ig.get('name') for ig in inst.findall('Ignore')] + ignores = [ig.get('name') for ig in entry.findall('Ignore')] + \ + [ig.get('name') for ig in inst.findall('Ignore')] + \ + self.ignores for file_result in result.get('files', []): if file_result[-1] not in modlist + ignores: instance_fail = True @@ -830,6 +836,10 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): self.logger.error("Incomplete information for entry %s:%s; cannot verify" \ % (entry.tag, entry.get('name'))) return False + elif entry.tag == 'Path' and entry.get('type') == 'ignore': + # ignored Paths are only relevant during failed package + # verification + pass else: if [attr for attr in self.__req__[entry.tag] if attr not in entry.attrib]: self.logger.error("Incomplete information for entry %s:%s; cannot verify" \ @@ -1008,3 +1018,10 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): init_ts.closeDB() del init_ts return keyids + + def VerifyPath(self, entry, _): + """ + We don't do anything here since all + Paths are processed in __init__ + """ + return True diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py index 494c9f896..9faeb3328 100644 --- a/src/lib/Client/Tools/YUMng.py +++ b/src/lib/Client/Tools/YUMng.py @@ -51,7 +51,9 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng): name = 'YUMng' __execs__ = ['/usr/bin/yum', '/var/lib/rpm'] - __handles__ = [('Package', 'yum'), ('Package', 'rpm')] + __handles__ = [('Package', 'yum'), + ('Package', 'rpm'), + ('Path', 'ignore')] __req__ = {'Package': ['name', 'version']} __ireq__ = {'Package': ['name']} |