On Sun, 13 Feb 2011, Jonathan Nieder wrote:
> Raphael Hertzog wrote:
> > On Sat, 12 Feb 2011, Jonathan Nieder wrote:
> 
> >>  2. Raphaël, maybe dpkg-source could do something like this?
> >>     utime does not return ENOENT unless all its arguments do not
> >>     exist.
> >
> > What's the point? I don't see how it matters...
> 
> When the filesystem is NFS, "utime(undef, undef, @files);" sets mtime
> and atime to the current time on the server side.  The time() function
> returns the current time on the client side.  The two can disagree,
> producing breakage.
> 
> Everything else (normal modification, "touch") uses the time on
> the server side, so to avoid problems in the presence of time skew,
> dpkg-source should, too.
> 
> Is that clearer?

Yes, so what matters is the undef parameter, and you want to modify all
files in a single call to have the same timestamp everywhere. But I'm not
sure you have that guarantee.

perl allow multiple files in a single call but the underlying C function
works on a single file at a time so each utime() call might generate a
different timestamp if you don't specify one explicitly... and thus you
might reintroduce a time skew between the various patched files. You trade
one problem for another (in particular since we now have timestamps up to
nanoseconds with ext4).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)




--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to