Make leaves pseudo-port recursive

This replaces the 'leaves' pseudo-port with the unreleased 'rleaves' and
removes the latter.

See: https://lists.macports.org/pipermail/macports-dev/2017-March/035462.html
This commit is contained in:
Rainer Müller
2017-10-25 16:04:37 +02:00
parent da3909b0ff
commit 14a5154087
3 changed files with 2 additions and 34 deletions
+1 -12
View File
@@ -159,18 +159,7 @@ When passing \fIportnames\fR to an \fIaction\fR, \fBport\fR recognizes various \
.sp -1
.IP \(bu 2.3
.\}
\fIleaves\fR: installed ports that are unrequested and have no dependents
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIrleaves\fR: installed ports that are unrequested and that no requested ports depend on
\fIleaves\fR: installed ports that are unrequested and that no requested ports depend on
.RE
.sp
Sets of ports can also be specified with \fIpseudo\-portname selectors\fR, which expand to the ports in which the value of the \fIPortfile\fR option corresponding to the selector\(cqs name (in either singular or plural form where applicable) matches the given regular expression\&. Usage is: selector:regex
+1 -2
View File
@@ -51,8 +51,7 @@ available port tree(s). These may be used in the same way as a 'portname'.
- 'requested': installed ports that were explicitly asked for
- 'unrequested': installed ports that were installed only to satisfy
dependencies
- 'leaves': installed ports that are unrequested and have no dependents
- 'rleaves': installed ports that are unrequested and that no
- 'leaves': installed ports that are unrequested and that no
requested ports depend on
Sets of ports can also be specified with 'pseudo-portname selectors', which
-20
View File
@@ -916,25 +916,6 @@ proc get_unrequested_ports {} {
}
proc get_leaves_ports {} {
set ilist {}
if { [catch {set ilist [registry::installed]} result] } {
if {$result ne "Registry error: No ports registered as installed."} {
ui_debug $::errorInfo
fatal "port installed failed: $result"
}
}
registry::open_dep_map
set results {}
foreach i $ilist {
set iname [lindex $i 0]
if {[registry::list_dependents $iname] eq ""} {
add_to_portlist results [list name $iname version "[lindex $i 1]_[lindex $i 2]" variants [split_variants [lindex $i 3]]]
}
}
return [portlist_sort [opIntersection $results [get_unrequested_ports]]]
}
proc get_rleaves_ports {} {
if { [catch {set ilist [get_unrequested_ports]} result] } {
if {$result ne "Registry error: No ports registered as installed."} {
ui_debug $::errorInfo
@@ -1315,7 +1296,6 @@ proc element { resname } {
^(inactive)(@.*)?$ -
^(actinact)(@.*)?$ -
^(leaves)(@.*)?$ -
^(rleaves)(@.*)?$ -
^(outdated)(@.*)?$ -
^(obsolete)(@.*)?$ -
^(requested)(@.*)?$ -