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

jmr at macports.org jmr at macports.org
Thu May 17 10:45:08 PDT 2012


Revision: 93197
          https://trac.macports.org/changeset/93197
Author:   jmr at macports.org
Date:     2012-05-17 10:45:07 -0700 (Thu, 17 May 2012)
Log Message:
-----------
don't try to rebuild obsolete ports in rev-upgrade

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 15:10:43 UTC (rev 93196)
+++ trunk/base/src/macports1.0/macports.tcl	2012-05-17 17:45:07 UTC (rev 93197)
@@ -4358,8 +4358,23 @@
         }
         set broken_ports [lsort -unique $broken_ports]
 
-        foreach port $broken_ports {
+        set temp_broken_ports $broken_ports
+        set broken_ports {}
+
+        foreach port $temp_broken_ports {
             set portname [$port name]
+            # don't try to rebuild ports that don't exist in the tree
+            if {${macports::revupgrade_mode} == "rebuild"} {
+                if {[catch {mportlookup $portname} result]} {
+                    ui_debug "$::errorInfo"
+                    error "lookup of portname $portname failed: $result"
+                }
+                if {[llength $result] < 2} {
+                    ui_warn "No port $portname found in the index; can't rebuild"
+                    unset broken_files_by_port($port)
+                    continue
+                }
+            }
             if {![info exists broken_port_counts($portname)]} {
                 set broken_port_counts($portname) 0
             }
@@ -4373,7 +4388,9 @@
             } elseif {$broken_port_counts($portname) > 1 && [global_option_isset ports_binary_only]} {
                 error "Port $portname still broken after reinstalling -- can't rebuild due to binary-only mode"
             }
+            lappend broken_ports $port
         }
+        unset temp_broken_ports
 
         if {${macports::revupgrade_mode} != "rebuild"} {
             ui_msg "$macports::ui_prefix Found [llength $broken_ports] broken port(s):"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120517/ce54b95e/attachment.html>


More information about the macports-changes mailing list