[Libreoffice-commits] Revert "installer: Use hashref for replace_all_ziplistvariables_in_rtffile"

Michael Meeks michael.meeks at suse.com
Thu Aug 23 01:43:09 PDT 2012


On Thu, 2012-08-23 at 10:13 +0200, Stephan Bergmann wrote:
> 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.

	Yep.

> 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.

	A good approach here of course is to do two installs, one un-modified
and one after the change; and then do a 'diff -u -r' on the installed
directories - ideally they are binary identical ;-)

	It's a shame to loose Tim's nice unit test too - I love tests for
make_installer.pl :-) Might be nice as/when this is nailed to have some
gnumake guru to help connect them into the build.

	When I last looked at some of this horrific line-by-line substitution
magic, it turned out to be faster to concatenate all the lines into a
single string, run the regexp and split it again rather than do the
line-by-line regexping that was there before ;-> horrific but ... still
- there are lots of less-moronic ways of doing that replacement ;-)

	It's great to have your ongoing cleanup work there ! pruning out great
chunks of un-readable, un-used, poorly performing cruft is cool.

	Thanks,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list