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

Bug#783475: texi2html: [PATCH] Allow make the build of documentation reproducible adding the use-date flag.



Juan Picca:
> The attached patch adds the flag use-date that allows use the given string
> for the date, instead the generated timestamps.

After review, the patch is either unneeded or incomplete.

> @@ -1910,6 +1911,8 @@ sub set_date()
>      }
>      $Texi2HTML::THISDOC{'today'} = $Texi2HTML::Config::DATE 
>          if (defined($Texi2HTML::Config::DATE));
> +    $Texi2HTML::THISDOC{'today'} = $Texi2HTML::Config::USE_DATE
> +        if (defined($Texi2HTML::Config::USE_DATE));

The two lines above actually already allow to set a date externally. I
don't see the need to add a new variable.

> +$T2H_OPTIONS -> {'use-date'} =
> +{
> + type => '=s',
> + linkage => \$Texi2HTML::Config::USE_DATE,
> + verbose => 'use given date in generation timestamps $s'
> +};
> +

Another problem is that the date given here will be copied straight to
the output when the default is to use a translated version of “January 1,
2015” (see `pretty_date` in `T2h_i18n.pm`). I guess it would make sense
to add an extra variable if it would be then use to replace the
`localtime` call in `pretty_date`.

-- 
Lunar                                .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   

Attachment: signature.asc
Description: Digital signature


Reply to: