[151267] contrib/mp-buildbot

mojca at macports.org mojca at macports.org
Thu Aug 11 01:03:06 PDT 2016


Revision: 151267
          https://trac.macports.org/changeset/151267
Author:   mojca at macports.org
Date:     2016-08-11 01:03:06 -0700 (Thu, 11 Aug 2016)
Log Message:
-----------
mp-buildbot: add (not too helpful) progress for the port watcher

Modified Paths:
--------------
    contrib/mp-buildbot/mpbb-install-dependencies
    contrib/mp-buildbot/mpbb-install-port
    contrib/mp-buildbot/mpbb-list-subports

Modified: contrib/mp-buildbot/mpbb-install-dependencies
===================================================================
--- contrib/mp-buildbot/mpbb-install-dependencies	2016-08-11 06:56:46 UTC (rev 151266)
+++ contrib/mp-buildbot/mpbb-install-dependencies	2016-08-11 08:03:06 UTC (rev 151267)
@@ -13,7 +13,8 @@
     local dependencies
     local dependencies_count
     local dependencies_counter
-    local log_status_dependencies
+    local log_status_dependencies="${option_logdir}/dependencies-progress.txt"
+    local log_subports_progress="${option_logdir}/ports-progress.txt"
 
     if [ -z "${option_port}" ]; then
         errmsg "--port is required"
@@ -22,13 +23,13 @@
 
     # prepare the log file and make sure to start with an empty one
     mkdir -p "${option_logdir}"
-    log_status_dependencies="${option_logdir}/dependencies-progress.txt"
     > "$log_status_dependencies"
 
     # calculate list of dependencies in-order
     dependencies=$("${option_prefix}/bin/port-tclsh" "${thisdir}/tools/dependencies.tcl" "${option_port}")
     if [ $? -ne 0 ]; then
         echo "Calculating dependencies for '${option_port}' failed, aborting." >&2
+        echo "[FAIL dependencies]" >> "$log_subports_progress"
         return 1
     fi
 
@@ -61,10 +62,11 @@
         echo -n "${text} ... " >> "$log_status_dependencies"
         if ! "${option_prefix}/bin/port" -d install --unrequested "$depname" $depvariants; then
             echo "Build of dependency '${depname}' failed, aborting." >&2
-            echo " [FAIL]" >> "$log_status_dependencies"
+            echo "[FAIL]" >> "$log_status_dependencies"
+            echo "[FAIL dependency '${depname}']" >> "$log_subports_progress"
             return 1
         else
-            echo " [OK]" >> "$log_status_dependencies"
+            echo "[OK]" >> "$log_status_dependencies"
             dependencies_counter=$((dependencies_counter + 1))
         fi
     done

Modified: contrib/mp-buildbot/mpbb-install-port
===================================================================
--- contrib/mp-buildbot/mpbb-install-port	2016-08-11 06:56:46 UTC (rev 151266)
+++ contrib/mp-buildbot/mpbb-install-port	2016-08-11 08:03:06 UTC (rev 151267)
@@ -13,6 +13,7 @@
     local log_port_contents="${option_logdir}/port-contents.txt"
     local log_port_stats="${option_logdir}/port-statistics.txt"
     local log_port_main="${option_logdir}/main.log"
+    local log_subports_progress="${option_logdir}/ports-progress.txt"
 
     if [ -z "${option_port}" ]; then
         errmsg "--port is required"
@@ -24,14 +25,19 @@
     #> "$log_port_contents"
     > "$log_port_stats"
 
+    # log: summary for the portwatcher
+    echo -n "- Installing ${option_port} ... " >> "$log_subports_progress"
 
     local time_start=$(date +%s)
     if ! "${option_prefix}/bin/port" -dk install "${option_port}"; then
         echo "Build of '${option_port}' failed."
+        echo "[FAIL]" >> "$log_subports_progress"
         return 1
     fi
     local time_stop=$(date +%s)
 
+    echo "[OK]" >> "$log_subports_progress"
+
     # log: contents
     "${option_prefix}/bin/port" -q contents "${option_port}" > "$log_port_contents"
 

Modified: contrib/mp-buildbot/mpbb-list-subports
===================================================================
--- contrib/mp-buildbot/mpbb-list-subports	2016-08-11 06:56:46 UTC (rev 151266)
+++ contrib/mp-buildbot/mpbb-list-subports	2016-08-11 08:03:06 UTC (rev 151267)
@@ -18,6 +18,7 @@
     local exclude
     local exclude_reasons
     local reason
+    local log_subports_progress="${option_logdir}/ports-progress.txt"
 
     os_version="$(sw_vers -productVersion | cut -d . -f 1-2)"
     is_64bit_capable="$(sysctl -n hw.cpu64bit_capable)"
@@ -48,13 +49,17 @@
 
         if [ $exclude -eq 0 ]; then
             echo "$port"
+            echo "- $port: added" >> "$log_subports_progress"
         else
             if [ ${#exclude_reasons[@]} -eq 1 ]; then
                 echo >&2 "Excluding '${port}' because ${exclude_reasons[0]}."
+                echo "- $port: SKIPPED because ${exclude_reasons[0]}" >> "$log_subports_progress"
             else
                 echo >&2 "Excluding '${port}' for the following reasons:"
+                echo "- $port: SKIPPED for the following reasons" >> "$log_subports_progress"
                 for reason in "${exclude_reasons[@]}"; do
                     echo >&2 " - ${reason}"
+                    echo "  - ${reason}" >> "$log_subports_progress"
                 done
             fi
         fi
@@ -62,6 +67,8 @@
 }
 
 list-subports() {
+    local log_subports_progress="${option_logdir}/ports-progress.txt"
+
     if [ $# -le 0 -a -z "${option_port}" ]; then
         errmsg "Either --port or a list of positional arguments with port names is required."
         return 1
@@ -69,6 +76,10 @@
 
     success=0
 
+    # prepare the log file and make sure to start with an empty one
+    mkdir -p "$option_logdir"
+    echo "== Adding subports ==" > "$log_subports_progress"
+
     if [ -n "${option_port}" ]; then
         print-subports "${option_port}" && success=1
     fi
@@ -81,4 +92,6 @@
         errmsg "None of the specified ports were found in the port index."
         return 1
     fi
+
+    echo "== Building subports ==" >> "$log_subports_progress"
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160811/643a2c08/attachment.html>


More information about the macports-changes mailing list