On Fri, Dec 28, 2012 at 08:44:59AM +0100, Raphael Hertzog wrote:
> > It seems rather improbable that anything else happens, doesn't it? I
> > mean all these files are modified automatically, and it seems very
> > probable to me that they all get the same mtime. But I may well be wrong
> > on this.
> 
> Indeed, you are wrong. mtime is precise up to nanoseconds with recent
> filesystems and it's unlikely that the mtime matches even when the files
> are modified in a single patch call.

I prepared a patch for that issue, attached and commited to the
package git. I'd appreciate if you could review it. As far as I
understand, it does what you described.

Bye, Mt.

-- 
The tragedy of modern man is not that he knows less and less about the
meaning of his own life, but that it bothers him less and less.
          --- Vaclav Havel
Description: ensure that all mtime of modified files are equal when pushing
 This is intended to avoid time skew in build systems in some cases.
 .
 See the discussion
 http://lists.debian.org/debian-policy/2008/02/msg00030.html for more
 context information.
Bug-Debian: http://bugs.debian.org/466360
Upstream-status: to be submitted 

Index: quilt.git/quilt/push.in
===================================================================
--- quilt.git.orig/quilt/push.in        2012-12-28 12:01:14.788082227 +0100
+++ quilt.git/quilt/push.in     2012-12-28 12:03:18.546143818 +0100
@@ -30,7 +30,8 @@
 specified number of patches.  When a patch name is specified, apply
 all patches up to and including the specified patch.  Patch names may
 include the patches/ prefix, which means that filename completion can
-be used.
+be used. The mtime of all touched files will be exactly the same to
+prevent time skews.
 
 -a     Apply all patches in the series file.
 
@@ -208,12 +209,18 @@
                        touch $QUILT_PC/$patch~refresh
                fi
 
+               modif_time=`date +%m%d%H%M.%S`
                if [ -e "$QUILT_PC/$patch" ]
                then
-                       touch $QUILT_PC/$patch/.timestamp
+                       touch -t "$modif_time" "$QUILT_PC/$patch/.timestamp"
                else
                        mkdir "$QUILT_PC/$patch"
                fi
+               touched_files=`quilt files $patch`
+               if [ -n "$touched_files" ] 
+               then
+                       touch -t "$modif_time" $touched_files
+               fi
 
                if ! [ -e $patch_file ]
                then

Reply via email to