Tcl Source Code

View Ticket
Ticket UUID: fb2208172c671f29d60e9ac928d9ded45d01d8b8
Title: tclIndex varies across builds from auto_mkindex
Type: Bug Version: 8.6.6
Submitter: bmwiedemann Created on: 2017-07-17 06:51:29
Subsystem: 69. Other Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2017-07-17 08:05:34
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2017-07-17 08:05:34
might be related to

The exmh package in openSUSE does not build reproducibly
because the tclIndex files varies for each build.

Here is a simple patch to fix it:

From: "Bernhard M. Wiedemann" <[email protected]>
Date: Mon, 17 Jul 2017 08:32:17 +0200
Subject: [PATCH] Sort glob used in auto_mkindex

necessary because glob manual says
No particular order is guaranteed in the list,
so if a sorted list is required the caller should use lsort.

This was causing the exmh package to not build reproducibly.
See for why this matters.
 library/auto.tcl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/auto.tcl b/library/auto.tcl
index 97ea8af..568beb0 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -203,7 +203,7 @@ proc auto_mkindex {dir args} {

-    foreach file [glob -- {*}$args] {
+    foreach file [lsort [glob -- {*}$args]] {
        try {
            append index [auto_mkindex_parser::mkindex $file]
        } on error {msg opts} {
User Comments: jan.nijtmans added on 2017-07-17 08:05:34:
Thanks for the bug report. Fixed in all active branches.