[66037] trunk/base/src/port/port.tcl
jmr at macports.org
jmr at macports.org
Mon Apr 5 01:21:22 PDT 2010
Revision: 66037
http://trac.macports.org/changeset/66037
Author: jmr at macports.org
Date: 2010-04-05 01:21:19 -0700 (Mon, 05 Apr 2010)
Log Message:
-----------
add 'leaves' pseudo-port
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2010-04-05 07:54:47 UTC (rev 66036)
+++ trunk/base/src/port/port.tcl 2010-04-05 08:21:19 UTC (rev 66037)
@@ -854,6 +854,25 @@
return [get_ports_with_prop requested 0]
}
+proc get_leaves_ports {} {
+ set ilist {}
+ if { [catch {set ilist [registry::installed]} result] } {
+ if {$result != "Registry error: No ports registered as installed."} {
+ global errorInfo
+ ui_debug "$errorInfo"
+ fatal "port installed failed: $result"
+ }
+ }
+ set results {}
+ foreach i $ilist {
+ set iname [lindex $i 0]
+ if {[registry::list_dependents $iname] == ""} {
+ 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_dependent_ports {portname recursive} {
registry::open_dep_map
set deplist [registry::list_dependents $portname]
@@ -1036,6 +1055,7 @@
^uninstalled(@.*)?$ -
^active(@.*)?$ -
^inactive(@.*)?$ -
+ ^leaves(@.*)?$ -
^outdated(@.*)?$ -
^obsolete(@.*)?$ -
^requested(@.*)?$ -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100405/c1c85450/attachment-0001.html>
More information about the macports-changes
mailing list