[81464] trunk/base/src/images_to_archives.tcl
jmr at macports.org
jmr at macports.org
Sun Jul 31 02:26:50 PDT 2011
Revision: 81464
http://trac.macports.org/changeset/81464
Author: jmr at macports.org
Date: 2011-07-31 02:26:50 -0700 (Sun, 31 Jul 2011)
Log Message:
-----------
add progress output to images_to_archives.tcl (#30347)
Modified Paths:
--------------
trunk/base/src/images_to_archives.tcl
Modified: trunk/base/src/images_to_archives.tcl
===================================================================
--- trunk/base/src/images_to_archives.tcl 2011-07-31 09:22:36 UTC (rev 81463)
+++ trunk/base/src/images_to_archives.tcl 2011-07-31 09:26:50 UTC (rev 81464)
@@ -33,8 +33,11 @@
# list of ports we successfully create an archive of, to be used to update
# the registry only after we know all creation attempts were successful.
set archived_list {}
+set installed_len [llength $ilist]
+set counter 0
foreach installed $ilist {
+ incr counter
set iname [lindex $installed 0]
set iversion [lindex $installed 1]
set irevision [lindex $installed 2]
@@ -84,6 +87,7 @@
# compute new name and location of archive
set archivename "${iname}-${iversion}_${irevision}${ivariants}.${macports::os_platform}_${macports::os_major}.[join $archs -].${archivetype}"
+ ui_msg "Processing ${counter} of ${installed_len}: ${archivename}"
if {$installtype == "image"} {
set targetdir [file dirname $location]
} else {
@@ -115,8 +119,13 @@
}
}
+set archived_len [llength $archived_list]
+set counter 0
+
registry::write {
foreach archived $archived_list {
+ incr counter
+ ui_msg "Updating registry: ${counter} of ${archived_len}"
set installtype [lindex $archived 0]
set iref [lindex $archived 1]
set newlocation [lindex $archived 3]
@@ -134,8 +143,11 @@
}
}
+set counter 0
foreach archived $archived_list {
+ incr counter
set location [lindex $archived 2]
+ ui_msg "Deleting ${counter} of ${archived_len}: ${location}"
if {$location != "" && [file isdirectory $location]} {
if {[catch {file delete -force $location} result]} {
ui_warn "Failed to delete ${location}: $result"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110731/53d53e9a/attachment.html>
More information about the macports-changes
mailing list