[151141] contrib/mp-buildbot/mpbb-cleanup

ryandesign at macports.org ryandesign at macports.org
Sun Aug 7 21:40:36 PDT 2016


Revision: 151141
          https://trac.macports.org/changeset/151141
Author:   ryandesign at macports.org
Date:     2016-08-07 21:40:36 -0700 (Sun, 07 Aug 2016)
Log Message:
-----------
mp-buildbot: improve cleanup output

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

Modified: contrib/mp-buildbot/mpbb-cleanup
===================================================================
--- contrib/mp-buildbot/mpbb-cleanup	2016-08-08 04:33:51 UTC (rev 151140)
+++ contrib/mp-buildbot/mpbb-cleanup	2016-08-08 04:40:36 UTC (rev 151141)
@@ -5,18 +5,22 @@
 # Do not execute this directly!
 
 cleanup-help() {
-    echo "Clean up build remnants and leftovers caused by previous builds."
+    echo "Clean up remnants from previous builds."
 }
 
 cleanup() {
-    echo "Running cleanup..."
-    # Deactivate active ports
-    "${option_prefix}/bin/port" -fp deactivate active
-    # Uninstall obsolete ports
+    echo "----> Deactivating ports"
+    if [ -n "$("${option_prefix}/bin/port" -q installed active)" ]; then
+        "${option_prefix}/bin/port" -fp deactivate active
+    fi
+
+    echo "----> Uninstalling obsolete ports"
     "${option_prefix}/bin/port-tclsh" "${thisdir}/tools/uninstall-old-ports.tcl"
-    # Delete old distfiles
+
+    echo "----> Deleting 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
+
+    echo "----> Deleting build files 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/e1d60a6e/attachment.html>


More information about the macports-changes mailing list