diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-27 10:35:22 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-06-27 10:42:24 -0400 |
commit | 9f85b41f12bdc5f25d64b91a6c0413949c9c730e (patch) | |
tree | 89621a8edb804c32dbd54edec372686211c61458 /src/lib/Bcfg2/Client/Tools/Portage.py | |
parent | 3261f7cf5314a76b85884942d077146fe8f8fc24 (diff) | |
download | bcfg2-9f85b41f12bdc5f25d64b91a6c0413949c9c730e.tar.gz bcfg2-9f85b41f12bdc5f25d64b91a6c0413949c9c730e.tar.bz2 bcfg2-9f85b41f12bdc5f25d64b91a6c0413949c9c730e.zip |
Options: migrated client drivers to new parser
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools/Portage.py')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/Portage.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/Portage.py b/src/lib/Bcfg2/Client/Tools/Portage.py index e52da081b..a877b564f 100644 --- a/src/lib/Bcfg2/Client/Tools/Portage.py +++ b/src/lib/Bcfg2/Client/Tools/Portage.py @@ -5,9 +5,13 @@ import Bcfg2.Client.Tools class Portage(Bcfg2.Client.Tools.PkgTool): - """The Gentoo toolset implements package and service operations and - inherits the rest from Toolset.Toolset.""" - name = 'Portage' + """The Gentoo toolset implements package and service operations + and inherits the rest from Tools.Tool.""" + + options = Bcfg2.Client.Tools.PkgTool.options + [ + Bcfg2.Options.BooleanOption( + cf=('Portage', 'binpkgonly'), help='Portage binary packages only')] + __execs__ = ['/usr/bin/emerge', '/usr/bin/equery'] __handles__ = [('Package', 'ebuild')] __req__ = {'Package': ['name', 'version']} @@ -25,8 +29,7 @@ class Portage(Bcfg2.Client.Tools.PkgTool): self._pkg_pattern = re.compile(r'(.*)-(\d.*)') self._ebuild_pattern = re.compile('(ebuild|binary)') self.installed = {} - self._binpkgonly = self.setup.get('portage_binpkgonly', False) - if self._binpkgonly: + if Bcfg2.Options.setup.binpkgonly: self.pkgtool = self._binpkgtool self.RefreshPackages() @@ -61,7 +64,7 @@ class Portage(Bcfg2.Client.Tools.PkgTool): version = self.installed[entry.get('name')] entry.set('current_version', version) - if not self.setup['quick']: + if not Bcfg2.Options.setup.quick: if ('verify' not in entry.attrib or entry.get('verify').lower() == 'true'): |