From c9e23b89416cb752b82799dc0a1697d29bafd273 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Fri, 27 May 2011 12:57:31 -0400 Subject: [PATCH] add --noscripts to run_pkg_transaction, use it in cleanup --- share/runtime-cleanup.tmpl | 2 +- src/pylorax/treebuilder.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl index 407c828f..a93238a0 100644 --- a/share/runtime-cleanup.tmpl +++ b/share/runtime-cleanup.tmpl @@ -180,7 +180,7 @@ removepkg xorg-x11-xauth removepkg xorg-x11-xinit removepkg yajl removepkg yum-utils -run_pkg_transaction +run_pkg_transaction --noscripts ## other removals remove /usr/share/doc diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py index bf17e086..8b6a040b 100644 --- a/src/pylorax/treebuilder.py +++ b/src/pylorax/treebuilder.py @@ -343,7 +343,9 @@ class TemplateRunner(object): for p in pkgs: self.yum.remove(pattern=p) - def run_pkg_transaction(self): + def run_pkg_transaction(self, *args): + if '--noscripts' in args: + self.yum.conf.tsflags.append("noscripts") self.yum.buildTransaction() self.yum.repos.setProgressBar(LoraxDownloadCallback()) self.yum.processTransaction(callback=LoraxTransactionCallback(),