[59100] trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl

ryandesign at macports.org ryandesign at macports.org
Fri Oct 9 14:23:34 PDT 2009


Revision: 59100
          http://trac.macports.org/changeset/59100
Author:   ryandesign at macports.org
Date:     2009-10-09 14:23:30 -0700 (Fri, 09 Oct 2009)
Log Message:
-----------
archcheck-1.0.tcl: Change the error message to show not what arch is missing from the examined file but what archs the examined file contains. This should speed up the tech support process a bit; see #21865.

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl	2009-10-09 21:15:51 UTC (rev 59099)
+++ trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl	2009-10-09 21:23:30 UTC (rev 59100)
@@ -55,13 +55,14 @@
         if {"/" != [string index ${file} 0]} {
             set file [file join ${prefix} ${file}]
         }
-        set file_archs " [strsed [exec lipo -info ${file}] {s/.*://}] "
+        set file_archs [string trim [strsed [exec lipo -info ${file}] {s/.*://}]]
         foreach requested_arch ${requested_archs} {
             if {9 <= ${os.major} && ${requested_arch} == "ppc"} {
                 set requested_arch ppc7400
             }
-            if {-1 == [string first " ${requested_arch} " ${file_archs}]} {
-                ui_error "You cannot install ${name} for the architecture(s) ${requested_archs}\nbecause ${file} does not contain the architecture ${requested_arch}."
+            if {-1 == [string first " ${requested_arch} " " ${file_archs} "]} {
+                ui_error "You cannot install ${name} for the architecture(s) ${requested_archs}"
+                ui_error "because ${file} only contains the architecture(s) ${file_archs}."
                 return -code error "incompatible architectures in dependencies"
             }
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091009/c0293804/attachment.html>


More information about the macports-changes mailing list