summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Touceda <chiiph@gentoo.org>2011-06-27 10:44:30 -0300
committerTomas Touceda <chiiph@gentoo.org>2011-06-27 10:44:30 -0300
commit93cc09c9d8f44f4f9e27e74cf9937d4db001b9c7 (patch)
treefb0be89db42d4ecf15a50f39bb55cac62eda4d6a
parenta7b51a462a22c8e593090b1098a19c3fd11136b6 (diff)
Execute postinst script and serialize script execution
-rw-r--r--lib/thandy/packagesys/ThpPackages.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/thandy/packagesys/ThpPackages.py b/lib/thandy/packagesys/ThpPackages.py
index 4c3d8a8..0579b5c 100644
--- a/lib/thandy/packagesys/ThpPackages.py
+++ b/lib/thandy/packagesys/ThpPackages.py
@@ -138,6 +138,8 @@ class ThpTransaction(object):
print "Preinst script for %s failed" % pkg
sys.exit(1)
pkg.install()
+ if pkg.run('postinst') != 0:
+ print "WARN: postinst script failed"
except AlreadyLocked:
print "You can't run more than one instance of Thandy"
except LockFailed:
@@ -309,4 +311,5 @@ class ScriptWrapper(object):
def run(self):
self._process = subprocess.Popen(["python", self._path],
env=self._env)
+ self._process.wait()
return self._process.returncode