[cig-commits] r18032 - cs/buildbot/trunk/buildbot/scripts

brad at geodynamics.org brad at geodynamics.org
Fri Mar 4 10:47:25 PST 2011


Author: brad
Date: 2011-03-04 10:47:25 -0800 (Fri, 04 Mar 2011)
New Revision: 18032

Modified:
   cs/buildbot/trunk/buildbot/scripts/packager.py
Log:
Fixed bugs in packager.

Modified: cs/buildbot/trunk/buildbot/scripts/packager.py
===================================================================
--- cs/buildbot/trunk/buildbot/scripts/packager.py	2011-03-04 17:22:00 UTC (rev 18031)
+++ cs/buildbot/trunk/buildbot/scripts/packager.py	2011-03-04 18:47:25 UTC (rev 18032)
@@ -20,7 +20,7 @@
 class PackingList(object):
     def __init__(self, config, opSys, python):
         
-        binDirs = ["bin", "sbin"]
+        binDirs = ["bin"]
         libDirs = ["lib", "libexec"]
         miscDirs = ["conf", "etc", "include", "share"]
         if platform.machine() == "x86 64":
@@ -51,15 +51,18 @@
 
         self.stripList = []
         if opSys == "linux":
-            libSuffix = ".so"
+            libSuffix = ".so*"
         elif opSys == "darwin":
             libSuffix = ".dylib"
         elif opSys == "win":
             libSuffix = ".dll"
-        for l in self.libraries:
-            if l.endswith(libSuffix):
-                self.stripList.append(l)
+        else:
+            sys.exit("Unknown OS: " + opSys)
 
+        #for l in self.libraries:
+        #    if l.endswith(libSuffix):
+        #        self.stripList.append(l)
+
         cig = [("CIG", "cig", "http://www.geodynamics.org/")]
         self.urls = cig + tupleUp(config.packaging.urls, 3)
 
@@ -546,9 +549,10 @@
         # Just plain "strip" renders our Python interpreter unusable
         # by extension modules.
         strip = "strip -S"
-    status = os.system(strip + " " + " ".join(pl.stripList))
-    if status != 0:
-        sys.exit("strip: exit %d" % status)
+    if len(pl.stripList) > 0:
+        status = os.system(strip + " " + " ".join(pl.stripList))
+        if status != 0:
+            sys.exit("strip: exit %d" % status)
     return
 
 
@@ -632,7 +636,7 @@
     if config.packaging is None:
         sys.exit('no packaging configuation; try "svn propedit buildbot:config ."')
 
-    if opSys == "linux":
+    if opSys == "linux": # False is TEMPORARY
         # We only need one of these; do it on Linux only.
         archive = distdir + ".tar.gz"
         taggedArchive = tag + "-" + archive
@@ -657,10 +661,10 @@
         os.chdir(workdir)
         os.system("rm " + distdir_arch)
         os.system("ln -s " + prefix + " " + distdir_arch)
-        packingList = [distdir_arch + "/" + m for m in pl.all()]
+        packingList = [distdir_arch + "/" + m for m in pl.directories]
         archive = distdir_arch + ".tar.gz"
         taggedArchive = tag + "-" + archive
-        status = os.system("tar cvzf " + archive + " " + " ".join(packingList))
+        status = os.system("tar cvzf " + archive + " " + " ".join(packingList) +">& log")
         if status != 0:
             sys.exit("tar: exit %d" % status)
 



More information about the CIG-COMMITS mailing list