<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/81979e5d7666f3a34490fe6dde22f21151079343">https://github.com/macports/macports-base/commit/81979e5d7666f3a34490fe6dde22f21151079343</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 81979e5d fix for an upgrade dep calculation corner case
</span>81979e5d is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 81979e5d7666f3a34490fe6dde22f21151079343
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Oct 31 16:50:37 2020 +1100
<span style='display:block; white-space:pre;color:#404040;'> fix for an upgrade dep calculation corner case
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> When not using --enforce-variants, don't calculate dependencies as
</span><span style='display:block; white-space:pre;color:#404040;'> though an already installed and up-to-date port was going to be
</span><span style='display:block; white-space:pre;color:#404040;'> reinstalled with the newly specified variants.
</span>---
src/macports1.0/macports.tcl | 13 ++++++++++++-
1 file changed, 12 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 efbf18f8..db45b7a9 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;'>@@ -4024,6 +4024,9 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> if {![info exists variations($variation)]} {
set variations($variation) $value
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # save the current variants for dependency calculation purposes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # in case we don't end up upgrading this port
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set installedvariations($variation) $value
</span> }
# Now merge in the global (i.e. variants.conf) variations.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4076,7 +4079,6 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> ui_error "Unable to open port: $result"
return 1
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array unset interp_options
</span>
array unset portinfo
array set portinfo [mportinfo $mport]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4119,6 +4121,13 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> if {[info exists portinfo(canonical_active_variants)] && $portinfo(canonical_active_variants) ne $oldvariant} {
if {[llength $variationslist] > 0} {
ui_warn "Skipping upgrade since $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_${revision_in_tree}, even though installed variants \"$oldvariant\" do not match \"$portinfo(canonical_active_variants)\". Use 'upgrade --enforce-variants' to switch to the requested variants."
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # reopen with the installed variants so deps are calculated correctly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ catch {mportclose $mport}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {set mport [mportopen $porturl [array get interp_options] [array get installedvariations]]} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug $::errorInfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Unable to open port: $result"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> } else {
ui_debug "Skipping upgrade since $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_${revision_in_tree}, even though installed variants \"$oldvariant\" do not match \"$portinfo(canonical_active_variants)\"."
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4129,6 +4138,8 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
</span> }
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ array unset interp_options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set will_build no
set already_installed [registry::entry_exists $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants)]
# avoid building again unnecessarily
</pre><pre style='margin:0'>
</pre>