[Reproducible-commits] [notes] 01/01: packages[khronos-opengl-man4]: Clarifications and additions from IRC.
Daniel Shahaf
danielsh at apache.org
Tue May 3 20:21:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
danielsh-guest pushed a commit to branch master
in repository notes.
commit 3c7fd6ba07af37bce5d37b1742c8ced326a89290
Author: Daniel Shahaf <d.s at daniel.shahaf.name>
Date: Tue May 3 20:05:36 2016 +0000
packages[khronos-opengl-man4]: Clarifications and additions from IRC.
Thanks boyska for the alternative fix.
---
packages.yml | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/packages.yml b/packages.yml
index e790f46..b3f0f4d 100644
--- a/packages.yml
+++ b/packages.yml
@@ -6165,7 +6165,7 @@ khronos-opengl-man4:
The -doc package's HTML index is unreproducible: the order of the keys 'glMemoryBarrier' and 'memoryBarrier' differs.
The index is generated by html/makeindex.py¹.
- It is sorted case-insensitively (see 'key=str.lower' argument on line 236),
+ It is sorted case-insensitively (see 'key=str.lower' argument on line 241),
and 'gl' prefixes are removed prior to sorting (see makeKey()) — that's why glMemoryBarrier is in the M's.
The relevant codepath is genDict() [callsite on line 310] → sortedKeys() → list.sort().
@@ -6174,9 +6174,16 @@ khronos-opengl-man4:
since refIndex is a __builtins__.dict, its .keys() method returns keys in an unpredictable order.
The fix would be to make sortedKeys() sort refIndex's keys deterministically, e.g.,
- by changing line 236 to «for key in sorted(dict.keys()):». (Note that using OrderedDict
- by itself won't suffice, since the keys are added in os.listdir() order, i.e., in
- readdir() order.)
+ by changing line 236 to «for key in sorted(dict.keys()):» (a case-sensitive sort, unlike
+ the one later in the function, since the dict will contain keys that are equal up to
+ case: 'memoryBarrier' and 'MemoryBarrier'), or by changing line 241 to
+ use «key=lambda dictkey: (dictkey.lower(), dictkey)».
+
+ Note that using OrderedDict by itself won't suffice, since the keys are
+ added in os.listdir() order, i.e., in readdir() order.
+
+ Note: since the root problem is dependency on both readdir() and dict iteration order, this
+ problem is non-deterministic.
¹ http://sources.debian.net/src/khronos-opengl-man4/1.0~svn31251-1/html/makeindex.py/
kicad:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/notes.git
More information about the Reproducible-commits
mailing list