On Sat, Oct 28, 2017 at 07:11:37PM +0200, Axel Beckert wrote:
> Hi Mattia,
> 
> Mattia Rizzolo wrote:
> > On Sat, Oct 28, 2017 at 02:21:37PM +0200, Axel Beckert wrote:
> > I tried live patching strip-nd by chaging the
> >     open(my $fh, '+<', $filename)
> > to
> >     open(my $fh, '<', $filename)
> > and indeed I could get a build completely identical to the one done
> > without R³ and unpatched strip-nd (and the log confirms files are still
> > being processed by strip-nd.
> 
> Did your example contain a PNG which needs a fixup?
> 
> But you're right that the "+" is not needed: The filehandle itself is
> not passed to copy_data(). And copy_data() uses copy() from File::Copy
> which surely does not rely on some specific filehandle being open. So
> you are very likely right — which is great. :-)
> 
> Looking at
> https://anonscm.debian.org/git/reproducible/strip-nondeterminism.git/tree/t/fixtures/png
> it seems as if tEXt.png.in is a case where strip-nd should change
> something (while the other examples contain symlinks and hence I
> expect those being examples where nothing should be changed).
> 
> So if the test suite passes with your patch, the patch should be fine.
> 
> Maybe the test suite should do a variant with read-only files which
> need to be modified, too, to verify that this case works, too, and
> continues to work.
> 
> If that case fails, it might suffice to first unlink the old file
> explicitly and then copy the temporary file.

Or (at the cost of invoking an external program) use install(1) or even
(shameless plug) install-mimic.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org p...@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to