Skip to content
Permalink
Browse files

error out if requested archs are not supported

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@68765 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jmroot committed Jun 12, 2010
1 parent 2c1e1dd commit f9f6094c03bb0a5f805634ee36d3842b834d4cea
Showing with 24 additions and 0 deletions.
  1. +5 −0 src/macports1.0/macports.tcl
  2. +19 −0 src/port1.0/portutil.tcl
@@ -1515,6 +1515,7 @@ proc _mportexec {target mport} {
# 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 @@ proc mportexec {mport target} {
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]} {
@@ -2559,6 +2559,25 @@ proc get_canonical_archs {} {
}
}

# 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

0 comments on commit f9f6094

Please sign in to comment.
You can’t perform that action at this time.