[85072] branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl

cal at macports.org cal at macports.org
Sun Oct 9 04:53:51 PDT 2011


Revision: 85072
          http://trac.macports.org/changeset/85072
Author:   cal at macports.org
Date:     2011-10-09 04:53:46 -0700 (Sun, 09 Oct 2011)
Log Message:
-----------
rev-upgrade: Force building from source, output progress percentage

Modified Paths:
--------------
    branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl

Modified: branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl	2011-10-09 11:07:17 UTC (rev 85071)
+++ branches/gsoc11-rev-upgrade/base/src/macports1.0/macports.tcl	2011-10-09 11:53:46 UTC (rev 85072)
@@ -3839,11 +3839,16 @@
 
     set files [registry::file search active 1 binary -null]
     if {[llength $files] > 0} {
+        set files_count [llength $files]
         registry::write {
             try {
-                ui_msg "$macports::ui_prefix Updating database of binaries"
+                ui_msg -nonewline "$macports::ui_prefix Updating database of binaries"
                 set i 1
                 foreach f $files {
+                    if {![macports::ui_isset ports_debug]} {
+                        ui_msg -nonewline "\r$macports::ui_prefix Updating database of binaries: [expr $i * 100 / $files_count]%"
+                        flush stdout
+                    }
                     ui_debug "Updating binary flag for file $i of [llength $files]: [$f path]"
                     incr i
                     $f binary [fileIsBinary [$f path]]
@@ -3853,11 +3858,12 @@
                 throw
             }
         }
+        ui_msg ""
     }
 
     set broken_files {};
     set binaries [registry::file search active 1 binary 1]
-    ui_msg "$macports::ui_prefix Scanning binaries for linking errors"
+    ui_msg -nonewline "$macports::ui_prefix Scanning binaries for linking errors"
     if {[llength $binaries] > 0} {
         set handle [machista::create_handle]
         if {$handle == "NULL"} {
@@ -3867,7 +3873,12 @@
         array set files_warned_about [list]
 
         set i 1
+        set binary_count [llength $binaries]
         foreach b $binaries {
+            if {![macports::ui_isset ports_debug]} {
+                ui_msg -nonewline "\r$macports::ui_prefix Scanning binaries for linking errors: [expr $i * 100 / $binary_count]%"
+                flush stdout
+            }
             #ui_debug "$i/[llength $binaries]: [$b path]"
             incr i
 
@@ -3881,6 +3892,9 @@
                     # ignore silently, these are only static libs anyway
                     #ui_debug "Error parsing file [$b path]: [machista::strerror $returncode]"
                 } else {
+                    if {![macports::ui_isset ports_debug]} {
+                        ui_msg ""
+                    }
                     ui_warn "Error parsing file [$b path]: [machista::strerror $returncode]"
                 }
                 continue;
@@ -3907,6 +3921,9 @@
 
                     if {$libreturncode != $machista::SUCCESS} {
                         if {![info exists files_warned_about($filepath)]} {
+                            if {![macports::ui_isset ports_debug]} {
+                                ui_msg ""
+                            }
                             ui_warn "Could not open $filepath: [machista::strerror $libreturncode]"
                             set files_warned_about($filepath) yes
                         }
@@ -3927,6 +3944,9 @@
                         }
 
                         if {[$loadcommand cget -mlt_version] != [$libarchitecture cget -mat_version] && [$loadcommand cget -mlt_comp_version] > [$libarchitecture cget -mat_comp_version]} {
+                            if {![macports::ui_isset ports_debug]} {
+                                ui_msg ""
+                            }
                             ui_warn "Incompatible library version of file [$loadcommand cget -mlt_install_name]: Expected [$loadcommand cget -mlt_comp_version], but got [$libarchitecture cget -mat_comp_version]"
                             ui_debug "Marking [$b path] as broken"
                             lappend broken_files [$b path]
@@ -3952,6 +3972,8 @@
                 set architecture [$architecture cget -next]
             }
         }
+        ui_msg ""
+
         machista::destroy_handle $handle
 
         if {[llength $broken_files] == 0} {
@@ -4051,9 +4073,12 @@
                 set macports::global_options(ports_revupgrade) "yes"
                 unset -nocomplain macports::global_options(ports_nodeps)
                 unset -nocomplain macports::global_options(ports_revupgrade_second_run)
+                unset -nocomplain macports::global_options(ports_source_only)
                 if {$broken_port_counts([$port name]) > 1} {
                     set macports::global_options(ports_revupgrade_second_run) yes
                     set macports::global_options(ports_nodeps) yes
+                    # build from source only until the buildbot has some method of rev-upgrade, too
+                    set macports::global_options(ports_source_only) yes
                 }
 
                 # call macports::upgrade with ports_revupgrade option to rebuild the port
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111009/e128cc8e/attachment.html>


More information about the macports-changes mailing list