[PUSHED] Refactor installer::sorter

Michael Meeks michael.meeks at suse.com
Thu Feb 16 05:56:07 PST 2012

Hi Tim,

On Wed, 2012-02-15 at 21:58 +0000, Tim Retout wrote:
> Here are a few patches related to installer::sorter.  I've tried to
> keep them low-risk, because much of the code is called during Windows
> builds, which I'm not yet testing.

	Thanks ! :-) One thing I do when I hack this stuff, is to keep a
pristine install tree around from the known working version; and do a
sequence of new ooinstall's as I re-factor, and a:

	diff -ur old-inst new-inst

	just to sanity check :-)

> I think the sort algorithm used currently in installer::sorter must be
> equivalent to bubble sort; in any case, I removed two of the
> subroutines, and replaced the third with a Schwartzian Transform
> (which might be overkill for this case, but I need to check the
> callers).

	Heh :-) it is of course, no surprise that the original author didn't
know how to use perl's 'sort' builtin, and great to see some of this
stuff disappear.

> I added a unit test for the remaining sort function, but I haven't
> tried to plug it in to the build system or anything.  I tried to adapt
> the standard license header template to Perl comments.

	Oh - interesting. So I think this might be our first perl unit test
ever ;-)

	As such - you prolly want to ask Markus for some help - I guess we want
the tests in solenv/ and to just run a perl script that passes or fails

	Oh, and it'd be great if you can add [PATCH] to the Subject when you
send your nice work, so we can see it stuff more quickly :-)

	Thanks again for the encouraging progress !

	All the best,


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

More information about the LibreOffice mailing list