<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/6f1248680d23718d4d8a467c9ac203c68744a6a4">https://github.com/macports/macports-base/commit/6f1248680d23718d4d8a467c9ac203c68744a6a4</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 6f1248680d23718d4d8a467c9ac203c68744a6a4
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Feb 21 06:15:37 2024 +1100
<span style='display:block; white-space:pre;color:#404040;'> Use portlist:: prefix for op* procs
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The names are otherwise a little too generic.
</span>---
src/port/port.tcl | 22 +++++++++++-----------
src/portlist1.0/portlist.tcl | 8 ++++----
2 files changed, 15 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 07fbc8c8a..9d698a6e4 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;'>@@ -504,7 +504,7 @@ proc get_uninstalled_ports {} {
</span> # Return all - installed
set all [get_all_ports]
set installed [get_installed_ports]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [opComplement $all $installed]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [portlist::opComplement $all $installed]
</span> }
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -673,7 +673,7 @@ proc get_leaves_ports {} {
</span> add_to_portlist_with_defaults results [dict create name [$i name] version [$i version]_[$i revision] variants [split_variants [$i variants]]]
}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [portlist_sort [opComplement $results [get_requested_ports]]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [portlist_sort [portlist::opComplement $results [get_requested_ports]]]
</span> }
proc get_rleaves_ports {} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -682,7 +682,7 @@ proc get_rleaves_ports {} {
</span> set results [list]
foreach i $ilist {
set deplist [get_dependent_ports [dict get $i name] 1]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$deplist eq "" || [opIntersection $deplist $requested] eq ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$deplist eq "" || [portlist::opIntersection $deplist $requested] eq ""} {
</span> add_to_portlist results $i
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -714,7 +714,7 @@ proc get_dependent_ports {portname recursive} {
</span> }
}
if {[llength $rportlist] > 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set results [opUnion $results $rportlist]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set results [portlist::opUnion $results $rportlist]
</span> set deplist $newlist
} else {
break
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -863,7 +863,7 @@ proc get_dep_ports {portname recursive} {
</span> }
}
if {[llength $rportlist] > 0} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set results [opUnion $results $rportlist]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set results [portlist::opUnion $results $rportlist]
</span> set deplist $newlist
} else {
break
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -949,7 +949,7 @@ proc seqExpr { resname } {
</span> set result [orExpr blist]
if {$result} {
# Calculate the union of result and b
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set reslist [opUnion $reslist $blist]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set reslist [portlist::opUnion $reslist $blist]
</span> }
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -971,7 +971,7 @@ proc orExpr { resname } {
</span> }
# Calculate a union b
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set reslist [opUnion $reslist $blist]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set reslist [portlist::opUnion $reslist $blist]
</span> }
default {
return $a
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -999,7 +999,7 @@ proc andExpr { resname } {
</span> }
# Calculate a intersect b
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set reslist [opIntersection $reslist $blist]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set reslist [portlist::opIntersection $reslist $blist]
</span> }
default {
return $a
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1023,7 +1023,7 @@ proc unaryExpr { resname } {
</span> set result [unaryExpr blist]
if {$result} {
set all [get_all_ports]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set reslist [opComplement $all $blist]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set reslist [portlist::opComplement $all $blist]
</span> }
}
default {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2879,7 +2879,7 @@ proc action_uninstall { action portlist opts } {
</span> if {[macports::global_option_isset port_uninstall_old]} {
# if -u then uninstall all inactive ports
# (union these to any other ports user has in the port list)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set portlist [opUnion $portlist [get_inactive_ports]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portlist [portlist::opUnion $portlist [get_inactive_ports]]
</span> } else {
# Otherwise the user hopefully supplied a portlist, or we'll default to the existing directory
if {[require_portlist portlist]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3415,7 +3415,7 @@ proc action_search { action portlist opts } {
</span> foreach {name info} $matches {
add_to_portlist_with_defaults tmp [dict create name $name {*}$info]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set res [opUnion $res $tmp]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set res [portlist::opUnion $res $tmp]
</span> }
set res [portlist_sort $res]
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/portlist1.0/portlist.tcl b/src/portlist1.0/portlist.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 6878503eb..1a217f55d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/portlist1.0/portlist.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/portlist1.0/portlist.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -199,7 +199,7 @@ proc portlist_sortregrefs {reflist} {
</span> return [lsort -command portlist_compareregrefs $reflist]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc unique_entries {entries} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc portlist::unique_entries {entries} {
</span> # Form the list of all the unique elements in the list a,
# considering only the port fullname, and taking the first
# found element first
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -213,13 +213,13 @@ proc unique_entries {entries} {
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc opUnion {a b} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc portlist::opUnion {a b} {
</span> # Return the unique elements in the combined two lists
return [unique_entries [concat $a $b]]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc opIntersection {a b} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc portlist::opIntersection {a b} {
</span> set result [list]
# Rules we follow in performing the intersection of two port lists:
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -266,7 +266,7 @@ proc opIntersection {a b} {
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc opComplement {a b} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc portlist::opComplement {a b} {
</span> set result [list]
# Return all elements of a not matching elements in b
</pre><pre style='margin:0'>
</pre>