bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make output of texinfo index deterministic


From: Patrice Dumas
Subject: Re: Make output of texinfo index deterministic
Date: Mon, 29 Jun 2015 21:30:55 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Mon, Jun 29, 2015 at 07:36:26AM +0900, Norbert Preining wrote:
> Dear all,
> 
> down here at Debian there is an activity to create reproducible
> buillds, absolutely reproducible. Thus we try to remove
> indetermancy as far as possible. In this case, texinfo indices
> are not deterministic. 

They indeed should be.

> I forward you the patch by Chris Lamb (in Cc)
> in case you consider it worth including.
> 
> >From the original bug report [0]
> 
> While working on the "reproducible builds" effort [1], we have noticed
> that texinfo generates indices in a non-deterministic order.
> 
> This appears to happen because the index sort is not stable with respect
> to the line number, resulting in output non-determinstically changing
> from:                                                                         
>   
>                                                                               
>   
>   * Entry   (line 1)                                                          
>   
>   * Entry   (line 2)
> 
> and
> 
>   * Entry   (line 2)
>   * Entry   (line 1)
> 
> .. when the entry is the same string.
> 
> The attached patch adds the line number to the sort comparator. Once
> applied, (some) packages using texinfo can be built reproducibly in
> our reproducible toolchain.

I do not think this patch is the best way to solve that issue for 2
reasons.

If the index entries appear in a user defined @-macro, they both will
have the same line number.  So they won't be disambiguated.  Also, the
file name should probably be used if going down that road.

But, more importantly, disambiguating index entries it is already what 
'number' is for.  It should be unique for each index entry in an index
type (maybe the flaw is that some indices are merged?)  So, before adding 
another disambiguation, I think that it would be better to try to
understand why the exiting one do not work...

Do you have a list of manuals that exhibit this issue, and an
explanation on how this can be triggered?

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]