Comment 2 for bug 1858467

Revision history for this message
Ben Franksen (bfrk) wrote : Re: [Bug 1858467] Re: dbExpand.pl outputs records in non-deterministic order

Am 06.01.20 um 20:45 schrieb Andrew Johnson:
> The suggested solution makes the result deterministic but still changes
> the record order. Would it be preferable to keep a list of the records
> in the order in which they were parsed? That wouldn't be hard to do if
> desirable.

An option that tells dbExpand.pl to keep the records in their original
order may be useful for some applications.

However, given that the standard purpose of dbExpand.pl is to create a
"normalized" version of the input db file via the DB_OPT flag (including
re-formatting and removing comments), additionally imposing an order
seems the more useful default behavior.BTW, this is also what the
predecessor dbst did (though with a different order: first by record
type, then by name, IIRC).

There also remains the question of whether to make the other output
commands deterministic, too.

> NB: The sense of the diff above is reversed, '-' lines normally show the
> existing code and '+' lines the new.

Sorry, I mixed up the order of commits in the git diff command.