<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/4d8901028d38dc7f062c73c0eb07d73df1703c63">https://github.com/macports/macports-base/commit/4d8901028d38dc7f062c73c0eb07d73df1703c63</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 4d8901028 Use registry2 in get_ports_with_prop
</span>4d8901028 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 4d8901028d38dc7f062c73c0eb07d73df1703c63
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Feb 7 17:50:07 2024 +1100
<span style='display:block; white-space:pre;color:#404040;'> Use registry2 in get_ports_with_prop
</span>---
src/port/port.tcl | 19 ++++---------------
1 file changed, 4 insertions(+), 15 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 56e034de6..208bde321 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;'>@@ -630,25 +630,14 @@ proc get_obsolete_ports {} {
</span>
# return ports that have registry property $propname set to $propval
proc get_ports_with_prop {propname propval} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ilist [list]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [catch {set ilist [registry::installed]} result] } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$result ne "Registry error: No ports registered as installed."} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug $::errorInfo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fatal "port installed failed: $result"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {set ilist [registry::entry search $propname $propval]} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug $::errorInfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fatal "registry search failed: $result"
</span> }
set results [list]
foreach i $ilist {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set iname [lindex $i 0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set iversion [lindex $i 1]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set irevision [lindex $i 2]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set ivariants [lindex $i 3]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set iepoch [lindex $i 5]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set regref [registry::open_entry $iname $iversion $irevision $ivariants $iepoch]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[registry::property_retrieve $regref $propname] eq $propval} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- add_to_portlist_with_defaults results [dict create name $iname version "${iversion}_${irevision}" variants [split_variants $ivariants]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_to_portlist_with_defaults results [dict create name [$i name] version [$i version]_[$i revision] variants [split_variants [$i variants]]]
</span> }
# Return the list of ports, sorted
</pre><pre style='margin:0'>
</pre>