<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/6724c8b018df94d3ab75a0ececad6e4bf36d805e">https://github.com/macports/macports-base/commit/6724c8b018df94d3ab75a0ececad6e4bf36d805e</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 6724c8b01 Use registry2 in action_contents
</span>6724c8b01 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 6724c8b018df94d3ab75a0ececad6e4bf36d805e
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sun Feb 11 02:45:58 2024 +1100
<span style='display:block; white-space:pre;color:#404040;'> Use registry2 in action_contents
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Also enables listing the image contents for inactive ports. If no
</span><span style='display:block; white-space:pre;color:#404040;'> version is given and multiple versions are installed, assumes the
</span><span style='display:block; white-space:pre;color:#404040;'> active version if there is one.
</span>---
src/port/port.tcl | 37 +++++++++++++++++++++++--------------
1 file changed, 23 insertions(+), 14 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 35a7ca816..856dedc3c 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;'>@@ -3113,6 +3113,7 @@ proc action_outdated { action portlist opts } {
</span>
proc action_contents { action portlist opts } {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set status 0
</span> if {[require_portlist portlist]} {
return 1
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3127,26 +3128,34 @@ proc action_contents { action portlist opts } {
</span> }
foreachport $portlist {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ![catch {set ilist [registry::installed $portname]} result] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # set portname again since the one we were passed may not have had the correct case
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set portname [lindex $ilist 0 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set composite_version [composite_version $portversion $variations]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ilist ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {set ilist [registry_installed $portname $composite_version no yes]} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug $::errorInfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break_softcontinue "port contents failed: $result" 1 status
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set files [registry::port_registered $portname]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { $files != 0 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [llength $files] > 0 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "Port $portname contains:"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach file $files {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts [subst $outstring]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "Port $portname does not contain any files or is not active."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$ilist ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set regref [lindex $ilist 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[catch {set regref [registry_installed $portname $composite_version yes no]} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug $::errorInfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break_softcontinue "port contents failed: $result" 1 status
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[$regref state] eq "installed"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set files [$regref files]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set files [$regref imagefiles]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$files != 0 && [llength $files] > 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_notice "Port [$regref name] @[$regref version]_[$regref revision][$regref variants] contains:"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach file $files {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts [subst $outstring]
</span> }
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_notice "Port $portname is not installed."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_notice "Port [$regref name] @[$regref version]_[$regref revision][$regref variants] does not have any files registered."
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $status
</span> }
# expand abbreviations of size units
</pre><pre style='margin:0'>
</pre>