[101313] trunk/base/src/macports1.0/macports.tcl

jmr at macports.org jmr at macports.org
Tue Jan 8 09:14:35 PST 2013


Revision: 101313
          https://trac.macports.org/changeset/101313
Author:   jmr at macports.org
Date:     2013-01-08 09:14:35 -0800 (Tue, 08 Jan 2013)
Log Message:
-----------
don't abort when encountering an unindexed port in rev-upgrade, but just exclude it from the rebuild list from the start

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2013-01-08 16:51:46 UTC (rev 101312)
+++ trunk/base/src/macports1.0/macports.tcl	2013-01-08 17:14:35 UTC (rev 101313)
@@ -4363,23 +4363,35 @@
         }
         set broken_ports [lsort -unique $broken_ports]
 
-        set temp_broken_ports $broken_ports
-        set broken_ports {}
-
-        foreach port $temp_broken_ports {
-            set portname [$port name]
+        if {${macports::revupgrade_mode} == "rebuild"} {
             # don't try to rebuild ports that don't exist in the tree
-            if {${macports::revupgrade_mode} == "rebuild"} {
+            set temp_broken_ports {}
+            foreach port $broken_ports {
+                set portname [$port name]
                 if {[catch {mportlookup $portname} result]} {
                     ui_debug "$::errorInfo"
                     error "lookup of portname $portname failed: $result"
                 }
-                if {[llength $result] < 2} {
+                if {[llength $result] >= 2} {
+                    lappend temp_broken_ports $port
+                } else {
                     ui_warn "No port $portname found in the index; can't rebuild"
-                    ui_warn "Either your portindex is corrupt or $portname has been removed; consider uninstalling it."
-                    error "Port $portname not found in index"
                 }
             }
+
+            if {[llength $temp_broken_ports] == 0} {
+                ui_msg "$macports::ui_prefix Broken files found, but all associated ports are not in the index and so cannot be rebuilt."
+                return 0
+            }
+        } else {
+            set temp_broken_ports $broken_ports
+        }
+
+        set broken_ports {}
+
+        foreach port $temp_broken_ports {
+            set portname [$port name]
+
             if {![info exists broken_port_counts($portname)]} {
                 set broken_port_counts($portname) 0
             }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130108/2da37e64/attachment.html>


More information about the macports-changes mailing list