[151112] contrib/mp-buildbot

ryandesign at macports.org ryandesign at macports.org
Sun Aug 7 14:18:21 PDT 2016


Revision: 151112
          https://trac.macports.org/changeset/151112
Author:   ryandesign at macports.org
Date:     2016-08-07 14:18:21 -0700 (Sun, 07 Aug 2016)
Log Message:
-----------
mp-buildbot: clean up remnants of all ports, not just the one we built

Modified Paths:
--------------
    contrib/mp-buildbot/README
    contrib/mp-buildbot/mpbb-cleanup

Modified: contrib/mp-buildbot/README
===================================================================
--- contrib/mp-buildbot/README	2016-08-07 21:08:26 UTC (rev 151111)
+++ contrib/mp-buildbot/README	2016-08-07 21:18:21 UTC (rev 151112)
@@ -29,7 +29,7 @@
     8. deploy
        Must be implemented in the buildmaster
     9. cleanup
-       mpbb cleanup --prefix /opt/local --port "$port"
+       mpbb cleanup --prefix /opt/local
        You will have to run this even if one of the previous steps failed.
 
 ## Step Implementation API

Modified: contrib/mp-buildbot/mpbb-cleanup
===================================================================
--- contrib/mp-buildbot/mpbb-cleanup	2016-08-07 21:08:26 UTC (rev 151111)
+++ contrib/mp-buildbot/mpbb-cleanup	2016-08-07 21:18:21 UTC (rev 151112)
@@ -5,20 +5,18 @@
 # Do not execute this directly!
 
 cleanup-help() {
-    echo "Clean up build remnants and leftovers caused by the build of port --port and its dependencies."
+    echo "Clean up build remnants and leftovers caused by previous builds."
 }
 
 cleanup() {
-    if [ -z "${option_port}" ]; then
-        errmsg "--port is required"
-        return 1
-    fi
-
     echo "Running cleanup..."
-    # Deactivate all ports
+    # Deactivate active ports
     "${option_prefix}/bin/port" -fp deactivate active
-    # Clean the ports we built and their dependencies
-    "${option_prefix}/bin/port" -fp clean --dist --logs --work "${option_port}" rdepof:"${option_port}"
     # Uninstall obsolete ports
     "${option_prefix}/bin/port-tclsh" "${thisdir}/tools/uninstall-old-ports.tcl"
+    # Delete old distfiles
+    find "${option_prefix}/var/macports/distfiles/" -type f -mtime +1 -print -delete
+    find "${option_prefix}/var/macports/distfiles/" -type d -mindepth 1 -empty -print -delete
+    # Delete work directories and logs
+    find "${option_prefix}/var/macports/build/" "${option_prefix}/var/macports/logs/" -mindepth 1 -print -delete
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160807/68029419/attachment.html>


More information about the macports-changes mailing list