gnu: hidapi: Fix 'license'.
[jackhill/guix/guix.git] / gnu / packages / patches / tcl-mkindex-deterministic.patch
CommitLineData
f8e7fdc4
LC
1This patch ensures that the 'tclIndex' files generated by 'auto_mkindex'
2are sorted in a deterministic fashion.
3
4Fixes a non-determinism issue reported
5at <https://lists.gnu.org/archive/html/guix-devel/2015-10/msg00696.html>.
6
7--- tcl8.6.4/library/auto.tcl 2015-02-26 17:57:28.000000000 +0100
8+++ tcl8.6.4/library/auto.tcl 2015-11-13 23:18:34.964831717 +0100
9@@ -207,6 +207,9 @@ proc auto_mkindex {dir args} {
10 set args *.tcl
11 }
12
13+ # Keep file names sorted in a determistic order.
14+ set args [lsort -ascii $args]
15+
16 auto_mkindex_parser::init
17 foreach file [glob -- {*}$args] {
18 try {
19@@ -241,6 +244,10 @@ proc auto_mkindex_old {dir args} {
20 if {![llength $args]} {
21 set args *.tcl
22 }
23+
24+ # Keep file names sorted in a determistic order.
25+ set args [lsort -ascii $args]
26+
27 foreach file [glob -- {*}$args] {
28 set f ""
29 set error [catch {