[MacPorts] #17182: Variables aren't expanded in path:-style dependencies

MacPorts noreply at macports.org
Sun Nov 23 02:07:31 PST 2008


#17182: Variables aren't expanded in path:-style dependencies
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  macports-tickets@…                   
     Type:  defect                   |      Status:  new                                  
 Priority:  Normal                   |   Milestone:  MacPorts base bugs                   
Component:  base                     |     Version:  1.6.0                                
 Keywords:                           |        Port:                                       
-------------------------------------+--------------------------------------

Comment(by mcalhoun@…):

 Please correct me if I am wrong, but it seems that the situation is:[[BR]]
  * portindex
 [http://trac.macports.org/browser/trunk/base/src/port/portindex.tcl#L43
 reads the Portfile] for dependencies.
  * /opt/local should not be in the Portindex, so portindex MIGHT try
 {{{
 set prefix {${prefix}}
 }}}
 before reading, which would result in ${prefix} in Portindex (instead of
 /opt/local).
  * Unfortunately, when Portindex is read, ${prefix} is evaluated to an
 empty string in
 [http://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl#L1545
 mportsearch].
  * So what portindex
 [http://trac.macports.org/browser/trunk/base/src/port/portindex.tcl#L42
 actually does] results in \${prefix} in Portindex.
  * Unfortunately, when the procedure
 [http://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl#L1109
 _pathtest] is finally called, the argument depspec still contains
 \${prefix}, which is never evaluated.
  * Therefore,  _pathtest not only
 [http://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl#L1121
 prepends] the actual prefix, but, even if it didn't, would not work
 correctly because
 [http://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl#L1126
 _mportsearchpath] is searching for something with \${prefix} in it.

 My Tcl is limited, so I do not know why
 {{{
 set line [read $fd $len]
 }}}
 behaves the way it does if $fd contains ${prefix} (not \${prefix}).

 I tried a couple of things (like using eval) to have ${prefix} be
 evaluated in _pathtest, but all I could manage was to have an empty string
 for ${prefix}.

-- 
Ticket URL: <http://trac.macports.org/ticket/17182#comment:18>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list