<p>On Aug 23, 2012 9:13 AM, "Stephan Bergmann" <<a href="mailto:sbergman@redhat.com">sbergman@redhat.com</a>> wrote:<br>
><br>
> On 08/23/2012 09:59 AM, Libreoffice Gerrit user wrote:<br>
>><br>
>> commit 52755d6d2cf1c6addaf3c91b93bb86d66b730409<br>
>> Author: Stephan Bergmann <<a href="mailto:sbergman@redhat.com">sbergman@redhat.com</a>><br>
>> Date:   Thu Aug 23 09:47:13 2012 +0200<br>
>><br>
>>      Revert "installer: Use hashref for replace_all_ziplistvariables_in_rtffile"<br>
>><br>
>>      This reverts commit 46a977081c6f1886f8fff8457c85e6d426dcc20f.  It started to<br>
>>      replace occurrences of "${...}" unknown to the installer with empty strings,<br>
>>      instead of keeping them as-is.  This caused the "${ORIGIN}" at the start of the<br>
>>      value for URE_BOOTSTRAP to disappear from the soffice ini-file (cf.<br>
>>      gid_Brand_Profileitem_Soffice_UreBootstrap in scp2/source/ooo/common_brand.scp),<br>
>>      making soffice fail to start completely.</p>
<p>> Needed to revert, see above.  The original situation of how the installer Perl code (we have no good name to talk about it, btw) does string replacements was never really satisfactory to begin with, replacing just those "${abc}" it happens to recognize (i.e., that are defined in instsetoo_native/util/openoffice.lst, IIUC) and leaving unknown ones (like "${ORIGIN}") alone.</p>

<p>Oh dear, sorry. :(  I could quite easily modify the patch to restore that behaviour... and I'd add a test for it.  But I can see that it's not ideal - if ORIGIN gets added to openoffice.lst, it will still fall over.</p>

<p>> A much more robust approach would be to specify an escape mechanism (either "\$" to quote "$" and "\\" to quote "\", or "$$" to quote "$", say) in the input language of the installer code.  But doing so would mean that all the existing input text needs to be reviewed, adding escapements exactly where necessary.</p>

<p>Hmm. And then these would need unescaping.</p>
<p>...<br>
</p>