[68765] trunk/base/src
jmr at macports.org
jmr at macports.org
Sat Jun 12 14:56:58 PDT 2010
Revision: 68765
http://trac.macports.org/changeset/68765
Author: jmr at macports.org
Date: 2010-06-12 14:56:55 -0700 (Sat, 12 Jun 2010)
Log Message:
-----------
error out if requested archs are not supported
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2010-06-12 21:56:14 UTC (rev 68764)
+++ trunk/base/src/macports1.0/macports.tcl 2010-06-12 21:56:55 UTC (rev 68765)
@@ -1515,6 +1515,7 @@
# xxx: set the work path?
set workername [ditem_key $mport workername]
if {![catch {$workername eval check_variants $target} result] && $result == 0 &&
+ ![catch {$workername eval check_supported_archs $target} result] && $result == 0 &&
![catch {$workername eval eval_targets $target} result] && $result == 0} {
# If auto-clean mode, clean-up after dependency install
if {[string equal ${macports::portautoclean} "yes"]} {
@@ -1576,6 +1577,10 @@
if {[$workername eval _check_xcode_version] != 0} {
return 1
}
+ # error out if selected arch(s) not supported by this port
+ if {[$workername eval check_supported_archs] != 0} {
+ return 1
+ }
# upgrade dependencies that are already installed
if {![macports::global_option_isset ports_nodeps]} {
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2010-06-12 21:56:14 UTC (rev 68764)
+++ trunk/base/src/port1.0/portutil.tcl 2010-06-12 21:56:55 UTC (rev 68765)
@@ -2559,6 +2559,25 @@
}
}
+# check that the selected archs are supported
+proc check_supported_archs {} {
+ global supported_archs build_arch universal_archs configure.build_arch configure.universal_archs name
+ if {$supported_archs == "noarch"} {
+ return 0
+ } elseif {[variant_exists universal] && [variant_isset universal]} {
+ if {[llength ${configure.universal_archs}] > 1 || $universal_archs == ${configure.universal_archs}} {
+ return 0
+ } else {
+ ui_error "$name cannot be installed for the configured universal_archs '$universal_archs' because it only supports the arch(s) '$supported_archs'."
+ return 1
+ }
+ } elseif {$build_arch == "" || ${configure.build_arch} != ""} {
+ return 0
+ }
+ ui_error "$name cannot be installed for the configured build_arch '$build_arch' because it only supports the arch(s) '$supported_archs'."
+ return 1
+}
+
# check if the installed xcode version is new enough
proc _check_xcode_version {} {
global os.subplatform macosx_version xcodeversion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100612/fc4f1970/attachment.html>
More information about the macports-changes
mailing list