[102248] trunk/base/src/port
raimue at macports.org
raimue at macports.org
Tue Jan 29 08:36:47 PST 2013
Revision: 102248
https://trac.macports.org/changeset/102248
Author: raimue at macports.org
Date: 2013-01-29 08:36:47 -0800 (Tue, 29 Jan 2013)
Log Message:
-----------
port:
Add 'port space --total' which displays the grand total only
Modified Paths:
--------------
trunk/base/src/port/port-help.tcl
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port-help.tcl
===================================================================
--- trunk/base/src/port/port-help.tcl 2013-01-29 16:05:37 UTC (rev 102247)
+++ trunk/base/src/port/port-help.tcl 2013-01-29 16:36:47 UTC (rev 102248)
@@ -314,6 +314,7 @@
--units <units> Specify units to use. Accepted units are: B, kB, KiB, MB, MiB,
GB, GiB. The 'B' may be omitted.
+--total Display the grand total only
}
set porthelp(srpm) {
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2013-01-29 16:05:37 UTC (rev 102247)
+++ trunk/base/src/port/port.tcl 2013-01-29 16:36:47 UTC (rev 102248)
@@ -3360,11 +3360,13 @@
set space [expr $space + [file size $file] ]
}
}
- set msg "[bytesize $space $units] $portname"
- if { $portversion != {} } {
- append msg " @$portversion"
+ if {![info exists options(ports_space_total)] || $options(ports_space_total) != "yes"} {
+ set msg "[bytesize $space $units] $portname"
+ if { $portversion != {} } {
+ append msg " @$portversion"
+ }
+ puts $msg
}
- puts $msg
set spaceall [expr $space + $spaceall]
} else {
puts "Port $portname does not contain any file or is not active."
@@ -3373,7 +3375,7 @@
puts "Port $portname is not installed."
}
}
- if {[llength $portlist] > 1} {
+ if {[llength $portlist] > 1 || ([info exists options(ports_space_total)] && $options(ports_space_total) == "yes")} {
puts "[bytesize $spaceall $units] total"
}
return 0
@@ -4240,7 +4242,7 @@
long_description maintainer maintainers name platform
platforms portdir regex revision variant variants version}
selfupdate {nosync}
- space {{units 1}}
+ space {{units 1} total}
activate {no-exec}
deactivate {no-exec}
install {no-rev-upgrade unrequested}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130129/cacf1a28/attachment.html>
More information about the macports-changes
mailing list