summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-07-28 05:10:44 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-07-28 05:10:44 +0000
commite15cfbee1ca7d29028a2417692da2840d040dfab (patch)
tree3779c649c944e1cc92317d6fdc322aee1ec99a24
parentb303459508ae2b9858e625bbac340d1b3ce91884 (diff)
downloadbcfg2-e15cfbee1ca7d29028a2417692da2840d040dfab.tar.gz
bcfg2-e15cfbee1ca7d29028a2417692da2840d040dfab.tar.bz2
bcfg2-e15cfbee1ca7d29028a2417692da2840d040dfab.zip
Don't execute the apt maintenance commands in dry-run mode
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2010 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Client/Debian.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py
index f54300037..2bee81cbb 100644
--- a/src/lib/Client/Debian.py
+++ b/src/lib/Client/Debian.py
@@ -22,11 +22,12 @@ class ToolsetImpl(Bcfg2.Client.Toolset.Toolset):
# dup /dev/null on top of stdin
null = open('/dev/null', 'w+')
os.dup2(null.fileno(), sys.__stdin__.fileno())
- self.saferun("dpkg --force-confold --configure -a")
- if not self.setup['build']:
- self.saferun("/usr/sbin/dpkg-reconfigure -f noninteractive debconf < /dev/null")
- self.saferun("apt-get clean")
- self.saferun("apt-get -q=2 -y update")
+ if not self.setup['dryrun']:
+ self.saferun("dpkg --force-confold --configure -a")
+ if not self.setup['build']:
+ self.saferun("/usr/sbin/dpkg-reconfigure -f noninteractive debconf < /dev/null")
+ self.saferun("apt-get clean")
+ self.saferun("apt-get -q=2 -y update")
self.installed = {}
self.pkgwork = {'add':[], 'update':[], 'remove':[]}
for pkg in [cpkg for cpkg in self.cfg.findall(".//Package") if not cpkg.attrib.has_key('type')]: