Hi Chris,

On Mon, 01 Mar 2021 13:08:03 -0000 "Chris Lamb" <la...@debian.org> wrote:
> Hi Nilesh,
> 
> (Just to say that I did not see your two emails until now; the bug
> submitter does not automatically receive emails sent directly to the
> bug email address — one should either CC them directly or use the
> 968045-submitter@ alias too.)

CC'ed you this time, and apologies for not having seen these emails till
now, I did not receive this either :)

> > Thanks again, but unfortunately this patch breaks the autopkgtests :/
> > The only way to make it reproducible and allow testing migration would
> > be to disable the tests.
> 
> As I understand the problem:
> 
> * The data underneath /testdata/ has non-deterministic data (PDFs)
> 
> * The patch prevents /testdata/ from being installed in the binary
>   package.
> 
> * The autopkgtests fail as they require this test data.

Yes, that is exactly what is happening

> > What do you think would be better? Please let me know.
> 
> Interesting choice of trade-off. Would it be possible for the
> autopkgtests to build the test data at "autopkgtest time"?

Probably, however this will need a few workarounds
Autopkgtests are triggered with the default autodep8 thing for
dh-make-golang,
So this will likely need a script followed by the normal autopkgtesting stuff

> Alternatively, do we need these PDFs? We could ship the testdata
> directory but not ship the .pdf files?

Probably not.
The build time tests are run as autopkgtests as well, so if you remove
these tests, or patch these out, the effect will be same on both.
One of the things I'm not very fond of about the golang system :)

Several packages keep on shipping these data just for testing purposes
-- nothing wrong, but lack of choice for customisation

> The other, nicer solution could be to patch fpdf to use the
> SOURCE_DATE_EPOCH environment variable if it exists. This would seem
> quite straightforward to do, actually -- this is fpdf.go from the
> "golang-github-jung-kurt-gofpdf" source package:
> 
>   // returns Now() if tm is zero
>   func timeOrNow(tm time.Time) time.Time {
>     if tm.IsZero() {
>       return time.Now()
>     }
>     return tm
>   }

Indeed, I'll give this a shot, and see how this goes, thanks for
pointing this out!

Nilesh

Attachment: signature.asc
Description: PGP signature

Reply via email to