Ignore:
Timestamp:
Jan 13, 2015, 12:59:14 AM (4 years ago)
Author:
sean@…
Message:

mpi-1.0: fix silently failing to enforce mpi variants

Previously, the mpi portgroup would try to append a mpi variant to the
default_variants variable. Unfortunately, this would fail and silently be
ignored leading to build-time issues.

This patch changes that behavior to raise an error explaining that the user
must match the mpi variant. For example, if hdf5 is installed with +mpich, then
netcdf must be installed with +mpich.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/mpi-1.0.tcl

    r130952 r131494  
    166166
    167167proc mpi.action_enforce_variants {args} {
     168    global name
    168169    foreach portname $args {
    169170        if {![catch {set result [active_variants $portname "" ""]}]} {
     
    172173
    173174            if {$otmpi ne "" && $mympi eq ""} {
    174                 default_variants +$otmpi
     175                # instead of trying to append to a default variant (which fails
     176                # silently for some cases), we should be explicit and tell the
     177                # user about the error
     178                ui_error "Need to select variant +$otmpi"
     179                return -code error "$portname +$otmpi is installed, so +$otmpi needs to be selected for $name"
    175180            } elseif {$otmpi ne $mympi} {
    176181                ui_error "Install $portname +$mympi"
Note: See TracChangeset for help on using the changeset viewer.