<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch release-2.6
in repository macports-base.

</pre>
<p><a href="https://github.com/macports/macports-base/commit/a39e5f0aa03928e88f32455176af14f0de320fdb">https://github.com/macports/macports-base/commit/a39e5f0aa03928e88f32455176af14f0de320fdb</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit a39e5f0aa03928e88f32455176af14f0de320fdb
</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><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    (cherry picked from commit 81979e5d7666f3a34490fe6dde22f21151079343)
</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 afec8416..cd5659a9 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;'>@@ -4003,6 +4003,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;'>@@ -4055,7 +4058,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;'>@@ -4098,6 +4100,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;'>@@ -4108,6 +4117,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>