[150702] contrib/mp-buildbot

ryandesign at macports.org ryandesign at macports.org
Tue Jul 26 22:48:49 PDT 2016


Revision: 150702
          https://trac.macports.org/changeset/150702
Author:   ryandesign at macports.org
Date:     2016-07-26 22:48:49 -0700 (Tue, 26 Jul 2016)
Log Message:
-----------
mp-buildbot: cleanup after gather-archives not install-port

Modified Paths:
--------------
    contrib/mp-buildbot/mpbb-cleanup
    contrib/mp-buildbot/mpbb-gather-archives
    contrib/mp-buildbot/mpbb-install-port

Modified: contrib/mp-buildbot/mpbb-cleanup
===================================================================
--- contrib/mp-buildbot/mpbb-cleanup	2016-07-27 05:37:18 UTC (rev 150701)
+++ contrib/mp-buildbot/mpbb-cleanup	2016-07-27 05:48:49 UTC (rev 150702)
@@ -6,7 +6,7 @@
 
 cleanup-help() {
     echo "Clean up build remnants and leftovers caused by the build of port --port."
-    echo "Note that you should not have to run this explicitly, as it is automatically run after install-dependencies on error and in any case after install-port."
+    echo "Note that you should not have to run this explicitly, as it is automatically run after install-dependencies and install-port on error and in any case after gather-archives."
 }
 
 cleanup() {

Modified: contrib/mp-buildbot/mpbb-gather-archives
===================================================================
--- contrib/mp-buildbot/mpbb-gather-archives	2016-07-27 05:37:18 UTC (rev 150701)
+++ contrib/mp-buildbot/mpbb-gather-archives	2016-07-27 05:48:49 UTC (rev 150702)
@@ -14,6 +14,7 @@
     tclsh=${option_prefix}/bin/port-tclsh
     mkdir -p "${option_staging_dir}" || return $?
 
+    status=0
     for archive_path in $("${option_prefix}/bin/port" -q location active); do
         archive_port=$(basename "$(dirname "${archive_path}")")
         archive_basename=$(basename "${archive_path}")
@@ -21,9 +22,12 @@
         if ! ${curl} -fIsL "${option_archive_site}/${archive_port}/${archive_basename}" > /dev/null; then
             if "${tclsh}" "${option_workdir}/tools/port_binary_distributable.tcl" -v "${archive_port}"; then
                 echo "Staging archive for upload: ${archive_basename}"
-                mkdir -p "${option_staging_dir}/${archive_port}" || return $?
-                cp -p "${archive_path}" "${option_staging_dir}/${archive_port}/${archive_basename}" || return $?
+                mkdir -p "${option_staging_dir}/${archive_port}" || { status=$?; break; }
+                cp -p "${archive_path}" "${option_staging_dir}/${archive_port}/${archive_basename}" || { status=$?; break; }
             fi
         fi
     done
+    
+    cleanup
+    return $status
 }

Modified: contrib/mp-buildbot/mpbb-install-port
===================================================================
--- contrib/mp-buildbot/mpbb-install-port	2016-07-27 05:37:18 UTC (rev 150701)
+++ contrib/mp-buildbot/mpbb-install-port	2016-07-27 05:48:49 UTC (rev 150702)
@@ -15,9 +15,9 @@
         return 1
     fi
 
-    status=0
-    "${option_prefix}/bin/port" -d install "${option_port}" || status=$?
-
-    cleanup
-    return $status
+    if ! "${option_prefix}/bin/port" -d install "${option_port}"; then
+        echo "Build failed, cleaning up..."
+        cleanup
+        return 1
+    fi
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160726/323c0e7a/attachment.html>


More information about the macports-changes mailing list