diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-08-05 17:29:20 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-08-05 17:29:20 +0000 |
commit | 9ef9c703159404dba311e18624d2fdd5fb399020 (patch) | |
tree | ebd19c69f8b96ca5b3c48444d0194de9815a828c /src/lib/Client/Tools/RPMng.py | |
parent | 3e55be9beb131b33b56985053f05272918ecb4b8 (diff) | |
download | bcfg2-9ef9c703159404dba311e18624d2fdd5fb399020.tar.gz bcfg2-9ef9c703159404dba311e18624d2fdd5fb399020.tar.bz2 bcfg2-9ef9c703159404dba311e18624d2fdd5fb399020.zip |
SSHbase: improve tempfile handling (patch from f.pauget) (Resolves Ticket #588)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4854 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/RPMng.py')
-rw-r--r-- | src/lib/Client/Tools/RPMng.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/RPMng.py b/src/lib/Client/Tools/RPMng.py index 21813e283..c1eec1ab6 100644 --- a/src/lib/Client/Tools/RPMng.py +++ b/src/lib/Client/Tools/RPMng.py @@ -108,6 +108,16 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): self.verify_fail_action = 'none' self.logger.debug('verify_fail_action = %s' % self.verify_fail_action) + # version_fail_action + if RPMng_CP.has_option(self.__name__, 'verify_flags'): + self.verify_flags = RPMng_CP.get(self.__name__, 'verify_flags').lower().split(',') + else: + self.verify_flags = [] + if '' in self.verify_flags: + self.verify_flags.remove('') + self.logger.debug('version_fail_action = %s' % self.version_fail_action) + + def RefreshPackages(self): ''' Creates self.installed{} which is a dict of installed packages. @@ -202,7 +212,7 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): if self.pkg_verify == 'true' and \ inst.get('pkg_verify', 'true') == 'true': - flags = inst.get('verify_flags', '').split(',') + flags = inst.get('verify_flags', '').split(',') + self.verify_flags if pkg.get('gpgkeyid', '')[-8:] not in self.gpg_keyids and \ entry.get('name') != 'gpg-pubkey': flags += ['nosignature', 'nodigest'] @@ -257,7 +267,7 @@ class RPMng(Bcfg2.Client.Tools.PkgTool): if self.pkg_verify == 'true' and \ inst.get('pkg_verify', 'true') == 'true': - flags = inst.get('verify_flags', '').split(',') + flags = inst.get('verify_flags', '').split(',') + self.verify_flags if pkg.get('gpgkeyid', '')[-8:] not in self.gpg_keyids: flags += ['nosignature', 'nodigest'] self.logger.info('WARNING: Package %s %s requires GPG Public key with ID %s'\ |