[tor-commits] [thandy/master] Execute postinst script and serialize script execution

nickm at torproject.org nickm at torproject.org
Thu Nov 3 19:14:20 UTC 2011


commit 93cc09c9d8f44f4f9e27e74cf9937d4db001b9c7
Author: Tomas Touceda <chiiph at gentoo.org>
Date:   Mon Jun 27 10:44:30 2011 -0300

    Execute postinst script and serialize script execution
---
 lib/thandy/packagesys/ThpPackages.py |    3 +++
 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





More information about the tor-commits mailing list