summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/APT.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-03-17 18:28:10 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-03-17 18:28:10 +0000
commit58b5e071c9b7c3fb27b0c918beca8f8d4fd557ee (patch)
tree1233255cfc8bd9467eeec36c7146102d936b20b0 /src/lib/Client/Tools/APT.py
parentb7e58e817e6326a6317387fe06db2a6448aea469 (diff)
downloadbcfg2-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/APT.py')
-rw-r--r--src/lib/Client/Tools/APT.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/Client/Tools/APT.py b/src/lib/Client/Tools/APT.py
index 89e01aaac..6782667fb 100644
--- a/src/lib/Client/Tools/APT.py
+++ b/src/lib/Client/Tools/APT.py
@@ -10,8 +10,10 @@ class APT(Bcfg2.Client.Tools.PkgTool):
the rest from Toolset.Toolset'''
__name__ = 'APT'
__execs__ = ['/usr/bin/debsums', '/usr/bin/apt-get', '/usr/bin/dpkg']
- __important__ = ["/etc/apt/sources.list", "/var/cache/debconf/config.dat", \
- "/var/cache/debconf/templates.dat", '/etc/passwd', '/etc/group', \
+ __important__ = ["/etc/apt/sources.list",
+ "/var/cache/debconf/config.dat",
+ "/var/cache/debconf/templates.dat",
+ '/etc/passwd', '/etc/group',
'/etc/apt/apt.conf', '/etc/dpkg/dpkg.cfg']
__handles__ = [('Package', 'deb')]
__req__ = {'Package': ['name', 'version']}
@@ -21,8 +23,8 @@ class APT(Bcfg2.Client.Tools.PkgTool):
svcre = re.compile("/etc/.*/[SK]\d\d(?P<name>\S+)")
- def __init__(self, logger, cfg, setup, states):
- Bcfg2.Client.Tools.PkgTool.__init__(self, logger, cfg, setup, states)
+ def __init__(self, logger, cfg, setup):
+ Bcfg2.Client.Tools.PkgTool.__init__(self, logger, cfg, setup)
self.cfg = cfg
os.environ["DEBIAN_FRONTEND"] = 'noninteractive'
self.installed = {}
@@ -98,10 +100,10 @@ class APT(Bcfg2.Client.Tools.PkgTool):
self.RefreshPackages()
self.extra = self.FindExtraPackages()
- def Install(self, packages):
+ def Install(self, packages, states):
if self.setup['kevlar'] and not self.setup['dryrun'] and not self.updated:
self.cmd.run("dpkg --force-confold --configure --pending")
self.cmd.run("apt-get clean")
self.cmd.run("apt-get -q=2 -y update")
self.updated = True
- Bcfg2.Client.Tools.PkgTool.Install(self, packages)
+ Bcfg2.Client.Tools.PkgTool.Install(self, packages, states)