You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Add 'rleaves' alias
This commit is contained in:
+11
@@ -162,6 +162,17 @@ When passing \fIportnames\fR to an \fIaction\fR, \fBport\fR recognizes various \
|
||||
\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
|
||||
.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
|
||||
.PP
|
||||
\fBThe \fR\fB\fIpseudo\-portname selectors\fR\fR\fB are:\fR
|
||||
|
||||
@@ -52,6 +52,8 @@ available port tree(s). These may be used in the same way as a 'portname'.
|
||||
- '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
|
||||
requested ports depend on
|
||||
|
||||
Sets of ports can also be specified with 'pseudo-portname selectors', which
|
||||
expand to the ports in which the value of the 'Portfile' option corresponding
|
||||
|
||||
Regular → Executable
+21
@@ -934,6 +934,26 @@ proc get_leaves_ports {} {
|
||||
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
|
||||
fatal "port installed failed: $result"
|
||||
}
|
||||
}
|
||||
registry::open_dep_map
|
||||
set requested [get_requested_ports]
|
||||
set results {}
|
||||
foreach i $ilist {
|
||||
set iname [lindex $i 9]
|
||||
set deplist [get_dependent_ports $iname 1]
|
||||
if {$deplist eq "" || [opIntersection $deplist $requested] eq ""} {
|
||||
add_to_portlist results $i
|
||||
}
|
||||
}
|
||||
return [portlist_sort $results]
|
||||
}
|
||||
|
||||
proc get_dependent_ports {portname recursive} {
|
||||
registry::open_dep_map
|
||||
set deplist [registry::list_dependents $portname]
|
||||
@@ -1295,6 +1315,7 @@ proc element { resname } {
|
||||
^(inactive)(@.*)?$ -
|
||||
^(actinact)(@.*)?$ -
|
||||
^(leaves)(@.*)?$ -
|
||||
^(rleaves)(@.*)?$ -
|
||||
^(outdated)(@.*)?$ -
|
||||
^(obsolete)(@.*)?$ -
|
||||
^(requested)(@.*)?$ -
|
||||
|
||||
Reference in New Issue
Block a user