<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[152162] contrib</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/152162">152162</a></dd>
<dt>Author</dt> <dd>larryv@macports.org</dd>
<dt>Date</dt> <dd>2016-08-30 13:50:45 -0700 (Tue, 30 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>mpbb: Deprecate &quot;--port&quot; option

Relevant subcommands now accept port names in the positional parameters,
as &quot;list-subports&quot; already did.

Keep the option functional until the updated Buildbot config goes live.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#contribbuildbottestmastercfg">contrib/buildbot-test/master.cfg</a></li>
<li><a href="#contribmpbuildbotREADMEmd">contrib/mp-buildbot/README.md</a></li>
<li><a href="#contribmpbuildbotmpbb">contrib/mp-buildbot/mpbb</a></li>
<li><a href="#contribmpbuildbotmpbbinstalldependencies">contrib/mp-buildbot/mpbb-install-dependencies</a></li>
<li><a href="#contribmpbuildbotmpbbinstallport">contrib/mp-buildbot/mpbb-install-port</a></li>
<li><a href="#contribmpbuildbotmpbblistsubports">contrib/mp-buildbot/mpbb-list-subports</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="contribbuildbottestmastercfg"></a>
<div class="modfile"><h4>Modified: contrib/buildbot-test/master.cfg (152161 => 152162)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/buildbot-test/master.cfg        2016-08-30 19:46:41 UTC (rev 152161)
+++ contrib/buildbot-test/master.cfg        2016-08-30 20:50:45 UTC (rev 152162)
</span><span class="lines">@@ -381,7 +381,7 @@
</span><span class="cx"> #portbuilder_factory.addStep(InfoStep(title=WithProperties(&quot;Port %(portname)s&quot;)))
</span><span class="cx"> 
</span><span class="cx"> portbuilder_factory.addStep(Compile(
</span><del>-    command=['./mpbb/mpbb', 'install-dependencies', '--prefix', WithProperties(prefix), '--port', WithProperties('%(portname)s')],
</del><ins>+    command=['./mpbb/mpbb', 'install-dependencies', '--prefix', WithProperties(prefix), WithProperties('%(portname)s')],
</ins><span class="cx">     name=&quot;install-dependencies&quot;,
</span><span class="cx">     description=[&quot;installing&quot;, &quot;dependencies&quot;],
</span><span class="cx">     descriptionDone=[&quot;install&quot;, &quot;dependencies&quot;],
</span><span class="lines">@@ -389,7 +389,7 @@
</span><span class="cx">     haltOnFailure=True))
</span><span class="cx"> 
</span><span class="cx"> portbuilder_factory.addStep(Compile(
</span><del>-    command=['./mpbb/mpbb', 'install-port', '--prefix', WithProperties(prefix), '--port', WithProperties('%(portname)s')],
</del><ins>+    command=['./mpbb/mpbb', 'install-port', '--prefix', WithProperties(prefix), WithProperties('%(portname)s')],
</ins><span class="cx">     name=&quot;install-port&quot;,
</span><span class="cx">     description=[&quot;installing&quot;, &quot;port&quot;],
</span><span class="cx">     descriptionDone=[&quot;install&quot;, &quot;port&quot;],
</span></span></pre></div>
<a id="contribmpbuildbotREADMEmd"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/README.md (152161 => 152162)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/README.md        2016-08-30 19:46:41 UTC (rev 152161)
+++ contrib/mp-buildbot/README.md        2016-08-30 20:50:45 UTC (rev 152162)
</span><span class="lines">@@ -27,25 +27,19 @@
</span><span class="cx">             --svn-url https://svn.macports.org/repository/macports/trunk \
</span><span class="cx">             --svn-revision 123456
</span><span class="cx"> 
</span><del>-3.  Print to standard output a list of all subports for one port...
</del><ins>+3.  Print one or more ports' subports to standard output.
</ins><span class="cx"> 
</span><del>-        mpbb list-subports --prefix /opt/local --port php
</del><ins>+        mpbb list-subports --prefix /opt/local php cmake llvm-3.8 [...]
</ins><span class="cx"> 
</span><del>-    ...or for several.
-
-        mpbb list-subports --prefix /opt/local cmake llvm-3.8 ...
-
</del><span class="cx"> 4.  For each subport listed in step 3:
</span><span class="cx"> 
</span><span class="cx">     a.  Install dependencies.
</span><span class="cx"> 
</span><del>-            mpbb install-dependencies \
-                --prefix /opt/local \
-                --port php71
</del><ins>+            mpbb install-dependencies --prefix /opt/local php71
</ins><span class="cx"> 
</span><span class="cx">     b.  Install the subport itself.
</span><span class="cx"> 
</span><del>-            mpbb install-port --prefix /opt/local --port php71
</del><ins>+            mpbb install-port --prefix /opt/local php71
</ins><span class="cx"> 
</span><span class="cx">     c.  Gather archives.
</span><span class="cx"> 
</span><span class="lines">@@ -87,8 +81,6 @@
</span><span class="cx">       The name of the subcommand.
</span><span class="cx"> -   `$option_archive_site`:
</span><span class="cx">       The URL of the mirror to check for preexisting archives.
</span><del>--   `$option_port`:
-      The name of the port to install.
</del><span class="cx"> -   `$option_prefix`:
</span><span class="cx">       The prefix of the MacPorts installation.
</span><span class="cx"> -   `$option_staging_dir`:
</span></span></pre></div>
<a id="contribmpbuildbotmpbb"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb (152161 => 152162)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb        2016-08-30 19:46:41 UTC (rev 152161)
+++ contrib/mp-buildbot/mpbb        2016-08-30 20:50:45 UTC (rev 152162)
</span><span class="lines">@@ -52,10 +52,6 @@
</span><span class="cx">  --help
</span><span class="cx">    Print this usage message.
</span><span class="cx"> 
</span><del>- --port PORT
-   Name of the port to build in MacPorts. This is required for the steps that
-   build a port.
-
</del><span class="cx">  --variants VARIANTS
</span><span class="cx">    An optional string with port variants (empty by default; not fully
</span><span class="cx">    functional yet).
</span><span class="lines">@@ -144,6 +140,7 @@
</span><span class="cx">                     option_help=1
</span><span class="cx">                     ;;
</span><span class="cx">                 --port)
</span><ins>+                    # Deprecated and will be removed in the near future.
</ins><span class="cx">                     option_port=$2
</span><span class="cx">                     shift
</span><span class="cx">                     ;;
</span></span></pre></div>
<a id="contribmpbuildbotmpbbinstalldependencies"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-install-dependencies (152161 => 152162)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-install-dependencies        2016-08-30 19:46:41 UTC (rev 152161)
+++ contrib/mp-buildbot/mpbb-install-dependencies        2016-08-30 20:50:45 UTC (rev 152162)
</span><span class="lines">@@ -19,6 +19,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> install-dependencies() {
</span><ins>+    local port=${1-${option_port-}}
+    if [[ -z $port ]]; then
+        err &quot;Must specify a port&quot;
+        return 1
+    fi
</ins><span class="cx">     local dependencies
</span><span class="cx">     local dependencies_count
</span><span class="cx">     local dependencies_counter
</span><span class="lines">@@ -27,11 +32,6 @@
</span><span class="cx">     local log_status_dependencies=&quot;${option_logdir}/dependencies-progress.txt&quot;
</span><span class="cx">     local log_subports_progress=&quot;${option_logdir}/ports-progress.txt&quot;
</span><span class="cx"> 
</span><del>-    if [ -z &quot;${option_port:-}&quot; ]; then
-        err &quot;--port is required&quot;
-        return 1
-    fi
-
</del><span class="cx">     # prepare the log file and make sure to start with an empty one
</span><span class="cx">     mkdir -p &quot;${option_logdir}&quot;
</span><span class="cx">     &gt; &quot;$log_status_dependencies&quot;
</span><span class="lines">@@ -39,22 +39,22 @@
</span><span class="cx">     # calculate list of dependencies in-order
</span><span class="cx">     # $option_prefix and $thisdir are set in mpbb
</span><span class="cx">     # shellcheck disable=SC2154
</span><del>-    dependencies=$(&quot;${option_prefix}/bin/port-tclsh&quot; &quot;${thisdir}/tools/dependencies.tcl&quot; &quot;${option_port}&quot; &quot;${option_variants}&quot;)
</del><ins>+    dependencies=$(&quot;${option_prefix}/bin/port-tclsh&quot; &quot;${thisdir}/tools/dependencies.tcl&quot; &quot;$port&quot; &quot;${option_variants}&quot;)
</ins><span class="cx">     if [ $? -ne 0 ]; then
</span><del>-        echo &quot;Calculating dependencies for '${option_port}' failed, aborting.&quot; &gt;&amp;2
-        echo &quot;Building '${option_port}' ... [ERROR] (failed to calculate dependencies) maintainers: $(get-maintainers &quot;${option_port}&quot;).&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</del><ins>+        echo &quot;Calculating dependencies for '$port' failed, aborting.&quot; &gt;&amp;2
+        echo &quot;Building '$port' ... [ERROR] (failed to calculate dependencies) maintainers: $(get-maintainers &quot;$port&quot;).&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</ins><span class="cx">         return 1
</span><span class="cx">     fi
</span><span class="cx"> 
</span><span class="cx">     if [ -z &quot;$dependencies&quot; ]; then
</span><del>-        echo &quot;'${option_port}' has no dependencies, continuing.&quot; &gt;&amp;2
</del><ins>+        echo &quot;'$port' has no dependencies, continuing.&quot; &gt;&amp;2
</ins><span class="cx">         return 0
</span><span class="cx">     fi
</span><span class="cx"> 
</span><span class="cx">     dependencies_count=$(echo &quot;$dependencies&quot; | wc -l | sed 's/ *//g')
</span><span class="cx">     dependencies_counter=1
</span><span class="cx"> 
</span><del>-    echo &quot;Installing $dependencies_count dependencies of $option_port:&quot; | tee -a &quot;$log_status_dependencies&quot;
</del><ins>+    echo &quot;Installing $dependencies_count dependencies of $port:&quot; | tee -a &quot;$log_status_dependencies&quot;
</ins><span class="cx">     echo &quot;$dependencies&quot; | sed -E 's/^/ - /' | tee -a &quot;$log_status_dependencies&quot;
</span><span class="cx">     echo &gt;&gt; &quot;$log_status_dependencies&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">         if ! &quot;${option_prefix}/bin/port&quot; -d install --unrequested &quot;$depname&quot; $depvariants ${option_variants}; then
</span><span class="cx">             echo &quot;Build of dependency '${depname}' failed, aborting.&quot; &gt;&amp;2
</span><span class="cx">             echo &quot;[FAIL]&quot; &gt;&gt; &quot;$log_status_dependencies&quot;
</span><del>-            echo &quot;Building '${option_port}' ... [ERROR] (failed to install dependency '${depname}') maintainers: $(get-maintainers &quot;${option_port}&quot; &quot;${depname}&quot;).&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</del><ins>+            echo &quot;Building '$port' ... [ERROR] (failed to install dependency '${depname}') maintainers: $(get-maintainers &quot;$port&quot; &quot;${depname}&quot;).&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</ins><span class="cx">             return 1
</span><span class="cx">         else
</span><span class="cx">             echo &quot;[OK]&quot; &gt;&gt; &quot;$log_status_dependencies&quot;
</span></span></pre></div>
<a id="contribmpbuildbotmpbbinstallport"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-install-port (152161 => 152162)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-install-port        2016-08-30 19:46:41 UTC (rev 152161)
+++ contrib/mp-buildbot/mpbb-install-port        2016-08-30 20:50:45 UTC (rev 152162)
</span><span class="lines">@@ -19,6 +19,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> install-port() {
</span><ins>+    local port=${1-${option_port-}}
+    if [[ -z $port ]]; then
+        err &quot;Must specify a port&quot;
+        return 1
+    fi
</ins><span class="cx">     # $option_logdir is set in mpbb
</span><span class="cx">     # shellcheck disable=SC2154
</span><span class="cx">     local log_port_contents=&quot;${option_logdir}/port-contents.txt&quot;
</span><span class="lines">@@ -26,11 +31,6 @@
</span><span class="cx">     local log_port_main=&quot;${option_logdir}/main.log&quot;
</span><span class="cx">     local log_subports_progress=&quot;${option_logdir}/ports-progress.txt&quot;
</span><span class="cx"> 
</span><del>-    if [ -z &quot;${option_port:-}&quot; ]; then
-        err &quot;--port is required&quot;
-        return 1
-    fi
-
</del><span class="cx">     # prepare the log files and make sure to start with empty ones
</span><span class="cx">     mkdir -p &quot;${option_logdir}&quot;
</span><span class="cx">     #&gt; &quot;$log_port_contents&quot;
</span><span class="lines">@@ -41,19 +41,19 @@
</span><span class="cx">     time_start=$(date +%s)
</span><span class="cx">     # $option_prefix is set in mpbb
</span><span class="cx">     # shellcheck disable=SC2154
</span><del>-    if ! &quot;${option_prefix}/bin/port&quot; -dk install &quot;${option_port}&quot; ${option_variants}; then
-        echo &quot;Build of '${option_port}' failed.&quot;
</del><ins>+    if ! &quot;${option_prefix}/bin/port&quot; -dk install &quot;$port&quot; ${option_variants}; then
+        echo &quot;Build of '$port' failed.&quot;
</ins><span class="cx">         # log: summary for the portwatcher
</span><del>-        echo &quot;Building '${option_port}' ... [ERROR] maintainers: $(get-maintainers &quot;${option_port}&quot;).&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</del><ins>+        echo &quot;Building '$port' ... [ERROR] maintainers: $(get-maintainers &quot;$port&quot;).&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</ins><span class="cx">         return 1
</span><span class="cx">     fi
</span><span class="cx">     time_stop=$(date +%s)
</span><span class="cx"> 
</span><span class="cx">     # log: summary for the portwatcher
</span><del>-    echo &quot;Building '${option_port}' ... [OK]&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</del><ins>+    echo &quot;Building '$port' ... [OK]&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</ins><span class="cx"> 
</span><span class="cx">     # log: contents
</span><del>-    &quot;${option_prefix}/bin/port&quot; -q contents &quot;${option_port}&quot; &gt; &quot;$log_port_contents&quot;
</del><ins>+    &quot;${option_prefix}/bin/port&quot; -q contents &quot;$port&quot; &gt; &quot;$log_port_contents&quot;
</ins><span class="cx"> 
</span><span class="cx">     # TODO: printing statistics (and installing the port + dependencies)
</span><span class="cx">     #       only makes sense when the port hasn't been installed previously
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">     local print_arg_workdir=&quot;ERROR&quot;
</span><span class="cx">     local print_arg_destdir=&quot;ERROR&quot;
</span><span class="cx">     # First, compute port_workdir_size and port_destdir_size
</span><del>-    port_workdir=$(&quot;${option_prefix}/bin/port&quot; work &quot;${option_port}&quot;)
</del><ins>+    port_workdir=$(&quot;${option_prefix}/bin/port&quot; work &quot;$port&quot;)
</ins><span class="cx">     if [ -n &quot;$port_workdir&quot; ]; then
</span><span class="cx">         port_workdir_size=$(du -ks &quot;$port_workdir&quot; | sed 's/^ *//' | tr '\t' '\n' | head -n 1)
</span><span class="cx">         if [ $? -eq 0 ] &amp;&amp; [ -n &quot;$port_workdir_size&quot; ]; then
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">         fi
</span><span class="cx"> 
</span><span class="cx">         local port_destdir=&quot;$port_workdir/destroot&quot;
</span><del>-        # if we arrive here, 'port work $option_port' was successful, so we're
</del><ins>+        # if we arrive here, 'port work $port' was successful, so we're
</ins><span class="cx">         # at least going to print 'destdir: -'
</span><span class="cx">         print_arg_destdir=&quot;-&quot;
</span><span class="cx">         if [ -d &quot;$port_destdir&quot; ]; then
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> 
</span><span class="cx">     # log: main.log
</span><span class="cx">     local port_mainlog
</span><del>-    port_mainlog=$(&quot;${option_prefix}/bin/port&quot; logfile &quot;${option_port}&quot;)
</del><ins>+    port_mainlog=$(&quot;${option_prefix}/bin/port&quot; logfile &quot;$port&quot;)
</ins><span class="cx">     if [ $? -eq 0 ] &amp;&amp; [ -f &quot;$port_mainlog&quot; ]; then
</span><span class="cx">         cp -f &quot;$port_mainlog&quot; &quot;$log_port_main&quot;
</span><span class="cx">     fi
</span></span></pre></div>
<a id="contribmpbuildbotmpbblistsubports"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-list-subports (152161 => 152162)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-list-subports        2016-08-30 19:46:41 UTC (rev 152161)
+++ contrib/mp-buildbot/mpbb-list-subports        2016-08-30 20:50:45 UTC (rev 152162)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">     local log_subports_progress=&quot;${option_logdir}/ports-progress.txt&quot;
</span><span class="cx"> 
</span><span class="cx">     if [ $# -le 0 ] &amp;&amp; [ -z &quot;${option_port:-}&quot; ]; then
</span><del>-        err &quot;Either --port or a list of positional arguments with port names is required.&quot;
</del><ins>+        err &quot;Must specify at least one port&quot;
</ins><span class="cx">         return 1
</span><span class="cx">     fi
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>