diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-03-17 18:28:10 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-03-17 18:28:10 +0000 |
commit | 58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee (patch) | |
tree | 1233255cfc8bd9467eeec36c7146102d936b20b0 /src/lib/Client/Tools/YUMng.py | |
parent | b7e58e817e6326a6317387fe06db2a6448aea469 (diff) | |
download | bcfg2-58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee.tar.gz bcfg2-58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee.tar.bz2 bcfg2-58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee.zip |
Remove validation states from Tool instances (in preparation for DecisionList stuff)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4423 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/YUMng.py')
-rw-r--r-- | src/lib/Client/Tools/YUMng.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py index 7bf6e8bc7..d41c27425 100644 --- a/src/lib/Client/Tools/YUMng.py +++ b/src/lib/Client/Tools/YUMng.py @@ -49,7 +49,7 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng): conflicts = ['RPMng'] - def Install(self, packages): + def Install(self, packages, states): ''' Try and fix everything that RPMng.VerifyPackages() found wrong for each Package Entry. This can result in individual RPMs being @@ -60,14 +60,14 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng): installed. packages is a list of Package Elements that has - self.states[<Package Element>] == False + states[<Package Element>] == False The following effects occur: - - self.states{} is conditionally updated for each package. + - states{} is conditionally updated for each package. - self.installed{} is rebuilt, possibly multiple times. - self.instance_status{} is conditionally updated for each instance of a package. - - Each package will be added to self.modified[] if its self.states{} + - Each package will be added to self.modified[] if its states{} entry is set to True. ''' self.logger.info('Running YUMng.Install()') @@ -124,7 +124,7 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng): self.RefreshPackages() self.gpg_keyids = self.getinstalledgpg() pkg = self.instance_status[gpg_keys[0]].get('pkg') - self.states[pkg] = self.VerifyPackage(pkg, []) + states[pkg] = self.VerifyPackage(pkg, []) # Install packages. if len(install_pkgs) > 0: @@ -241,10 +241,10 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng): if not self.setup['kevlar']: for pkg_entry in [p for p in packages if self.canVerify(p)]: self.logger.debug("Reverifying Failed Package %s" % (pkg_entry.get('name'))) - self.states[pkg_entry] = self.VerifyPackage(pkg_entry, \ - self.modlists.get(pkg_entry, [])) + states[pkg_entry] = self.VerifyPackage(pkg_entry, \ + self.modlists.get(pkg_entry, [])) - for entry in [ent for ent in packages if self.states[ent]]: + for entry in [ent for ent in packages if states[ent]]: self.modified.append(entry) def RemovePackages(self, packages): |