[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 93cc09c9d8f44f4f9e27e74cf9937d4db001b9c7
Author: Tomas Touceda <chiiph@xxxxxxxxxx>
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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits