Descriptionlilypond-book: Rewrite processing of snippets
The previous version relied on a stable hash() method, both for the
ordering in a set() and for the list's checksum. This probably worked
with Python 2 and up to Python 3.2, but later versions use a random
seed for invocations of hash(). This ensures different hash values for
subsequent invocations to make malicious attacks more difficult.
The new code uses hashlib.md5() and .hexdigest() instead which returns
a deterministic result across runs. It also sorts the snippets' names
which leads to more stable profiling results for 'make check'.
This change also tries to improve performance by writing snippets with
the same basename only once. Additionally it solves potential problems
if the build directory has the string '.ly' in its path.
Patch Set 1 #
Total comments: 9
Patch Set 2 : Address comments & revert temporary workaround in master #Patch Set 3 : snippet-names-*.ly -> .txt #Patch Set 4 : Revert change to .txt #
MessagesTotal messages: 10
|