Changeset 14532


Ignore:
Timestamp:
Oct 10, 2005, 2:23:55 PM (15 years ago)
Author:
pguyot (Paul Guyot)
Message:

Hack to act as if we were not expanding ${prefix}.
Remark:
port info tom

will output something with {${prefix}...} in it.

It's the way it worked (I mean in depends_*) and the way it still works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port/portindex.tcl

    r14501 r14532  
    55# Traverse through all ports, creating an index and archiving port directories
    66# if requested
    7 # $Id: portindex.tcl,v 1.33 2005/10/09 13:36:16 jberry Exp $
     7# $Id: portindex.tcl,v 1.34 2005/10/10 14:23:55 pguyot Exp $
    88
    99catch {source \
     
    100100}
    101101
    102 proc pindex {portdir} {
    103         variable prefix $darwinports::prefix
    104        
     102proc pindex {portdir} {
    105103    global target fd directory archive outdir stats
    106104    incr stats(total)
     
    108106        puts "Failed to parse file $portdir/Portfile: $result"
    109107        incr stats(failed)
    110     } else {       
     108    } else {
     109                global darwinports::prefix
     110        set save_prefix $prefix
     111        set prefix {\${prefix}}
    111112        array set portinfo [dportinfo $interp]
     113        set $prefix $save_prefix
    112114        dportclose $interp
    113115        set portinfo(portdir) $portdir
     
    127129                exit 1
    128130            }
    129         }
    130        
    131         # Canonicalize any path: dependencies by substituting out $prefix
    132         foreach dependstype { depends_build depends_lib depends_run } {
    133                 if {[info exists portinfo($dependstype)]} {
    134                         set deps $portinfo($dependstype)
    135                         set newDeps {}
    136                         foreach dep $deps {
    137                                 lappend newDeps [regsub "^(path|lib|bin):$prefix/" $dep {\1:${prefix}/}]
    138                         }
    139                         set portinfo($dependstype) $newDeps
    140                 }
    141131        }
    142132       
Note: See TracChangeset for help on using the changeset viewer.