From e15cfbee1ca7d29028a2417692da2840d040dfab Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Fri, 28 Jul 2006 05:10:44 +0000 Subject: 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 --- src/lib/Client/Debian.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/lib/Client/Debian.py') 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')]: -- cgit v1.2.3-1-g7c22