Changeset 68765


Ignore:
Timestamp:
Jun 12, 2010, 9:56:55 PM (10 years ago)
Author:
jmr@…
Message:

error out if requested archs are not supported

Location:
trunk/base/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports.tcl

    r68749 r68765  
    15161516    set workername [ditem_key $mport workername]
    15171517    if {![catch {$workername eval check_variants $target} result] && $result == 0 &&
     1518        ![catch {$workername eval check_supported_archs $target} result] && $result == 0 &&
    15181519        ![catch {$workername eval eval_targets $target} result] && $result == 0} {
    15191520        # If auto-clean mode, clean-up after dependency install
     
    15751576        # possibly warn or error out depending on how old xcode is
    15761577        if {[$workername eval _check_xcode_version] != 0} {
     1578            return 1
     1579        }
     1580        # error out if selected arch(s) not supported by this port
     1581        if {[$workername eval check_supported_archs] != 0} {
    15771582            return 1
    15781583        }
  • trunk/base/src/port1.0/portutil.tcl

    r68691 r68765  
    25602560}
    25612561
     2562# check that the selected archs are supported
     2563proc check_supported_archs {} {
     2564    global supported_archs build_arch universal_archs configure.build_arch configure.universal_archs name
     2565    if {$supported_archs == "noarch"} {
     2566        return 0
     2567    } elseif {[variant_exists universal] && [variant_isset universal]} {
     2568        if {[llength ${configure.universal_archs}] > 1 || $universal_archs == ${configure.universal_archs}} {
     2569            return 0
     2570        } else {
     2571            ui_error "$name cannot be installed for the configured universal_archs '$universal_archs' because it only supports the arch(s) '$supported_archs'."
     2572            return 1
     2573        }
     2574    } elseif {$build_arch == "" || ${configure.build_arch} != ""} {
     2575        return 0
     2576    }
     2577    ui_error "$name cannot be installed for the configured build_arch '$build_arch' because it only supports the arch(s) '$supported_archs'."
     2578    return 1
     2579}
     2580
    25622581# check if the installed xcode version is new enough
    25632582proc _check_xcode_version {} {
Note: See TracChangeset for help on using the changeset viewer.