<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/9c48520c7347a84af603ed35ed27a96a42d57838">https://github.com/macports/macports-base/commit/9c48520c7347a84af603ed35ed27a96a42d57838</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 9c48520 Error when a port is opened with a nonexistent subport
</span>9c48520 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 9c48520c7347a84af603ed35ed27a96a42d57838
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sun Jul 30 19:46:03 2017 +1000
<span style='display:block; white-space:pre;color:#404040;'> Error when a port is opened with a nonexistent subport
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: #28
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/34619
</span>---
src/macports1.0/macports.tcl | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/macports.tcl b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index a7223ff..45b5c01 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1773,7 +1773,19 @@ proc mportopen {porturl {options {}} {variations {}} {nocache {}}} {
</span>
$workername eval {port::run_callbacks}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ditem_key $mport provides [$workername eval {set subport}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set actual_subport [$workername eval {set PortInfo(name)}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[$workername eval {info exists user_options(subport)}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # The supplied subport may have been set on the command line by the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # user, or simply obtained from the PortIndex or registry. Check that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # it's valid in case the user made a mistake.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set supplied_subport [$workername eval {set user_options(subport)}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$supplied_subport ne $actual_subport} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portname [$workername eval {set name}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mportclose $mport
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error "$portname does not have a subport '$supplied_subport'"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ditem_key $mport provides $actual_subport
</span>
return $mport
}
</pre><pre style='margin:0'>
</pre>