Ignore:
Timestamp:
Nov 13, 2015, 12:28:22 AM (3 years ago)
Author:
dstrubbe@…
Message:

compilers portgroup: Better error-handling -- if use of active_variants fails, we should write an error (for the enforce processes), or write a warning (for the active_variant_name processes, since I am not certain there is no use case for calling it like that). This will help catch bugs in Portfiles, e.g. misspelling, bad despec syntax, etc.

File:
1 edited

Legend:

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

    r142409 r142486  
    330330                return $c
    331331            }
     332        } else {
     333            ui_warn "c_active_variant_name: [active_variants $depspec $fc \"\"] fails."
    332334        }
    333335    }
     
    361363                return $fc
    362364            }
     365        } else {
     366            ui_warn "fortran_active_variant_name: [active_variants $depspec $fc \"\"] fails."
    363367        }
    364368    }
     
    508512                return -code error "$portname +$mycomp not installed"
    509513            }
     514         } else {
     515             ui_error "Internal error: compilers.enforce_c: '$portname' is not an installed port."
     516             return -code error "Internal error: compilers.enforce_c: '$portname' is not an installed port."
    510517        }
    511518    }
     
    537544                return -code error "$portname +$myf not installed"
    538545            }
    539         }
     546         } else {
     547             ui_error "Internal error: compilers.enforce_fortran: '$portname' is not an installed port."
     548             return -code error "Internal error: compilers.enforce_fortran: '$portname' is not an installed port."
     549         }
    540550    }
    541551}
Note: See TracChangeset for help on using the changeset viewer.