Changeset 41138


Ignore:
Timestamp:
Oct 25, 2008, 6:52:50 PM (12 years ago)
Author:
raimue@…
Message:

port1.0/portutil.tcl:
Use getportresourcepath for global variant descriptions

File:
1 edited

Legend:

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

    r41046 r41138  
    554554    global variant_descs_global
    555555
    556     set sourceconfigdir [getportresourcepath $porturl]
    557 
    558     if {$sourceconfigdir == ""} {
    559         # protocol does not support global variants
    560         return ""
    561     }
    562     set descfile [file join $sourceconfigdir variant_descriptions.conf]
    563     if {![info exists variant_descs_global($sourceconfigdir)]} {
    564         set variant_descs_global($sourceconfigdir) yes
     556    set descfile [getportresourcepath $porturl variant_descriptions.conf]
     557    if {![info exists variant_descs_global($descfile)]} {
     558        set variant_descs_global($descfile) yes
    565559
    566560        if {[file exists $descfile]} {
     
    575569                set desc [lindex $line 1]
    576570                if {$name != "" && $desc != ""} {
    577                     set variant_descs_global(${sourceconfigdir}_$name) $desc
     571                    set variant_descs_global(${descfile}_$name) $desc
    578572                } else {
    579573                    ui_warn "Invalid variant description in $descfile at line $lineno"
     
    584578    }
    585579
    586     if {[info exists variant_descs_global(${sourceconfigdir}_${variant})]} {
    587         return $variant_descs_global(${sourceconfigdir}_${variant})
     580    if {[info exists variant_descs_global(${descfile}_${variant})]} {
     581        return $variant_descs_global(${descfile}_${variant})
    588582    } else {
    589583        return ""
Note: See TracChangeset for help on using the changeset viewer.