Changeset 37507


Ignore:
Timestamp:
Jun 10, 2008, 2:04:54 PM (12 years ago)
Author:
raimue@…
Message:

port1.0/portutil.tcl:
Don't warn about a missing description if it is set global,
but warn if the variant overrides the global description

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/variant-descs-14482/base/src/port1.0/portlint.tcl

    r34872 r37507  
    143143
    144144proc lint_main {args} {
    145         global UI_PREFIX portname portpath portresourcepath
     145        global UI_PREFIX portname portpath porturl portresourcepath
    146146        set portfile ${portpath}/Portfile
    147147        set portdirs [split ${portpath} /]
     
    400400                # don't warn about missing descriptions for global variants
    401401                if {[lsearch -exact $local_variants $variantname] != -1 &&
    402                     [lsearch -exact $lint_variants $variantname] == -1} {
     402                    [lsearch -exact $lint_variants $variantname] == -1 &&
     403                    [variant_desc $porturl $variantname] == ""} {
    403404                    ui_warn "Variant $variantname does not have a description"
    404405                    incr warnings
     
    406407                } elseif {$variantdesc == ""} {
    407408                    set variantdesc "(pre-defined variant)"
     409                }
     410            } else {
     411                if {[variant_desc $porturl $variantname] != ""} {
     412                    ui_warn "Variant $variantname overrides global description"
     413                    incr warnings
    408414                }
    409415            }
Note: See TracChangeset for help on using the changeset viewer.