> On Dec 2, 2016, at 8:47 PM, Joshua Root <j...@macports.org> wrote: > >> On 2016-12-3 02:45, René J.V. Bertin wrote: >> >> Hi, >> >> I'm trying to understand a regression that seems coupled to the >> 2.3.4 -> 2.3.5 upgrade (or more exactly, "master just after 2.3.4" >> -> "master 25 commits after 2.3.5"). >> >> I had >> >> {{{ >> proc macports::normalize { filename } { >> set nprefix [file dirname [file normalize "${macports::prefix}/foo"]] >> return [string map {${nprefix} ${macports::prefix}} [file normalize >> $filename]] >> } >> }}} > > This was wrong all along. The enclosing braces on {${nprefix} > ${macports::prefix}} mean that no substitution will happen, so you're > mapping between those literal strings.
Additionally, "string map" does not evaluate any of its arguments, as certain other commands do (e.g., "if", "expr", "uplevel"). vq