[Top][All Lists]

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

Re: [Help-tar] [PATCH] Add --clamp-mtime option

From: Jakob Bohm
Subject: Re: [Help-tar] [PATCH] Add --clamp-mtime option
Date: Wed, 10 Jun 2015 08:34:36 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 10/06/2015 08:08, Paul Eggert wrote:
Jakob Bohm wrote:

This is because the timestamp manipulation is typically limited to
files that are going to be packaged, not to build intermediary files
(such as .o files).

One solution is to update the timestamps of build intermediary files as
well. Another is to save the time stamps of backdated files and to
restore them after running 'tar'.  Both of these should be easy to do.

That would be a lot of logic to gather up all that data into a data
structure, restore it afterwards, and hope no-one is calling you via
make -j.  You also need to handle the possibility of a failed build or
the maintainer hitting ctrl-C or the laptop running out of battery
etc. etc.

And do remember that debian source packages are independent of any
source control systems (git, svn etc. etc.) that you may have been
using when you created the package.

Sure, but the point is that you have some way of recording time stamps
of source files, and you want those recorded time stamps to be in the
tarball.  This is needed regardless of whether there's a --clamp-mtime

My point was that for purposes of dpkg, the most important ways are:

- The local filesystem timestamps during package development (where
 local changes are probably not yet checked into any repository).
- The timestamps in source packages when releasing/uploading (which
 need to function without access to any repository used by the

--clamp-mtime preserves the timestamp of files that are *not*
modified/created by the package build and should thus keep the
timestamp from the source package.

The method I'm proposing doesn't use --mtime and so doesn't need

If using touch, you will then need some way to tell touch (or a touch
wrapper) to only backdate, not forward date.  --clamp-mtime is that way
for the "virtual touch" inside tar.


Jakob Bohm, CIO, Partner, WiseMo A/S.
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded

reply via email to

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