[93221] trunk/base/src/macports1.0/macports.tcl
cal at macports.org
cal at macports.org
Thu May 17 16:57:47 PDT 2012
Revision: 93221
https://trac.macports.org/changeset/93221
Author: cal at macports.org
Date: 2012-05-17 16:57:46 -0700 (Thu, 17 May 2012)
Log Message:
-----------
rev-upgrade: Only print interactive progress info when stdout is a shell, #34480
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2012-05-17 23:45:00 UTC (rev 93220)
+++ trunk/base/src/macports1.0/macports.tcl 2012-05-17 23:57:46 UTC (rev 93221)
@@ -4136,13 +4136,14 @@
set files [registry::file search active 1 binary -null]
set files_count [llength $files]
+ set fancy_output [expr ![macports::ui_isset ports_debug] && [isatty stdout]]
if {$files_count > 0} {
registry::write {
try {
ui_msg -nonewline "$macports::ui_prefix Updating database of binaries"
set i 1
foreach f $files {
- if {![macports::ui_isset ports_debug]} {
+ if {$fancy_output} {
if {$files_count < 10000 || $i % 10 == 1 || $i == $files_count} {
ui_msg -nonewline "\r$macports::ui_prefix Updating database of binaries: [expr ($i * 1000 / $files_count) / 10.0]%"
flush stdout
@@ -4154,7 +4155,7 @@
if {0 != [catch {$f binary [fileIsBinary $fpath]} fileIsBinaryError]} {
# handle errors (e.g. file not found, permission denied) gracefully
- if {![macports::ui_isset ports_debug]} {
+ if {$fancy_output} {
ui_msg ""
}
ui_warn "Error determining file type of `$fpath': $fileIsBinaryError"
@@ -4183,7 +4184,7 @@
set i 1
foreach b $binaries {
- if {![macports::ui_isset ports_debug]} {
+ if {$fancy_output} {
if {$binary_count < 10000 || $i % 10 == 1 || $i == $binary_count} {
ui_msg -nonewline "\r$macports::ui_prefix Scanning binaries for linking errors: [expr ($i * 1000 / $binary_count) / 10.0]%"
flush stdout
@@ -4203,7 +4204,7 @@
# ignore silently, these are only static libs anyway
#ui_debug "Error parsing file ${bpath}: [machista::strerror $returncode]"
} else {
- if {![macports::ui_isset ports_debug]} {
+ if {$fancy_output} {
ui_msg ""
}
ui_warn "Error parsing file ${bpath}: [machista::strerror $returncode]"
@@ -4225,7 +4226,7 @@
} else {
set portname "<unknown-port>"
}
- if {![macports::ui_isset ports_debug]} {
+ if {$fancy_output} {
ui_msg ""
}
ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] (belonging to port $portname) contains relative path"
@@ -4236,7 +4237,7 @@
} else {
set portname "<unknown-port>"
}
- if {![macports::ui_isset ports_debug]} {
+ if {$fancy_output} {
ui_msg ""
}
ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] refers to non-existant file $idloadcmdpath"
@@ -4253,7 +4254,7 @@
} else {
set portname "<unknown-port>"
}
- if {![macports::ui_isset ports_debug]} {
+ if {$fancy_output} {
ui_msg ""
}
ui_warn "ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] refers to file $idloadcmdpath, which is a different file"
@@ -4381,7 +4382,7 @@
incr broken_port_counts($portname)
if {$broken_port_counts($portname) > 3} {
ui_error "Port $portname is still broken after rebuiling it more than 3 times."
- if {![macports::ui_isset ports_debug]} {
+ if {$fancy_output} {
ui_error "Please run port -d -y rev-upgrade and use the output to report a bug."
}
error "Port $portname still broken after rebuilding [expr $broken_port_counts($portname) - 1] time(s)"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120517/7f0fd798/attachment.html>
More information about the macports-changes
mailing list