<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch release-2.7
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/834ad13b740bd05610658c9d0718757c8aab95b0">https://github.com/macports/macports-base/commit/834ad13b740bd05610658c9d0718757c8aab95b0</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 834ad13b740bd05610658c9d0718757c8aab95b0
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Fri Oct 8 06:26:33 2021 +1100
<span style='display:block; white-space:pre;color:#404040;'> Ignore implicitly set versions in action_target
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/63438
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit db498e03d83e86bde460c87d8205382fdce64c87)
</span>---
src/port/port.tcl | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/port.tcl b/src/port/port.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index ced83d30..121abf78 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -332,7 +332,7 @@ proc require_portlist { nameportlist {is_upgrade "no"} } {
</span>
# Execute the enclosed block once for every element in the portlist
# When the block is entered, the following variables will have been set:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# portspec, porturl, portname, portversion, options, variations, requested_variations
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# portspec, porturl, portname, portversion, options, variations, requested_variations, portmetadata
</span> proc foreachport {portlist block} {
set savedir [pwd]
foreach portspec $portlist {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -349,6 +349,10 @@ proc foreachport {portlist block} {
</span> array set requested_variations $portspec(requested_variants)
array unset options
array set options $portspec(options)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ array unset portmetadata
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists portspec(metadata)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set portmetadata $portspec(metadata)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
# Invoke block
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1388,12 +1392,16 @@ proc element { resname } {
</span> set name [url_to_portname $token]
if {$name ne ""} {
parsePortSpec version requested_variants options
<span style='display:block; white-space:pre;background:#ffe0e0;'>- add_to_portlist reslist [list url $token \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set templist [list url $token \
</span> name $name \
version $version \
requested_variants [array get requested_variants] \
variants [array get requested_variants] \
options [array get options]]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$version ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend templist metadata [list explicit_version 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_to_portlist reslist $templist
</span> set el 1
} else {
ui_error "Can't open URL '$token' as a port"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1404,12 +1412,16 @@ proc element { resname } {
</span> default { # Treat anything else as a portspec (portname, version, variants, options
# or some combination thereof).
parseFullPortSpec url name version requested_variants options
<span style='display:block; white-space:pre;background:#ffe0e0;'>- add_to_portlist reslist [list url $url \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set templist [list url $url \
</span> name $name \
version $version \
requested_variants [array get requested_variants] \
variants [array get requested_variants] \
options [array get options]]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$version ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend templist metadata [list explicit_version 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_to_portlist reslist $templist
</span> set el 1
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1427,7 +1439,10 @@ proc add_multiple_ports { resname ports {remainder ""} } {
</span> parsePortSpec version variants options $remainder
array unset overrides
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$version ne ""} { set overrides(version) $version }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$version ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set overrides(version) $version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set overrides(metadata) [list explicit_version 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> if {[array size variants]} {
# we always record the requested variants separately,
# but requested ones always override existing ones
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4148,7 +4163,8 @@ proc action_target { action portlist opts } {
</span> if {[string length $portversion]} {
if {$action eq "clean"} {
set options(ports_version_glob) $portversion
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {$portversion ne "$portinfo(version)_$portinfo(revision)" && $portversion ne $portinfo(version)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[info exists portmetadata(explicit_version)] && [info exists portinfo(version)] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && $portversion ne "$portinfo(version)_$portinfo(revision)" && $portversion ne $portinfo(version)} {
</span> break_softcontinue "$portname version $portversion is not available (current version is $portinfo(version)_$portinfo(revision))" 1 status
}
}
</pre><pre style='margin:0'>
</pre>