From 005922085f0135c35baa4b0e8db6f05d78586377 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 3 Dec 2012 10:28:50 +0100 Subject: pop: Fix timestamp comparison The timestamps recorded on file systems have a limited resolution. For this reason, a patch or file with a timestamp exactly equal to .timestamp should be considered as more recent than .timestamp, i.e. potentially modified since the last push or refresh. This is particularly important for the test suite, as we can do many actions in the same second there. --- quilt.changes | 5 +++++ quilt/pop.in | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/quilt.changes b/quilt.changes index 5473771..5615d27 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 3 10:27:46 CET 2012 - jdelvare@suse.de + +- pop: Fix timestamp comparison. + ------------------------------------------------------------------- Thu Oct 25 18:04:15 CEST 2012 - jdelvare@suse.de diff --git a/quilt/pop.in b/quilt/pop.in index efacf09..8dde845 100644 --- a/quilt/pop.in +++ b/quilt/pop.in @@ -70,14 +70,14 @@ files_may_have_changed() if [ $? -ne 0 -o ! -e "$patch_file" \ -o ! -e "$QUILT_PC/$patch/.timestamp" \ - -o "$QUILT_PC/$patch/.timestamp" -ot "$patch_file" ] + -o ! "$QUILT_PC/$patch/.timestamp" -nt "$patch_file" ] then return 0 fi for file in $(files_in_patch $patch) do - [ "$QUILT_PC/$patch/.timestamp" -ot $file ] && return 0 + [ ! "$QUILT_PC/$patch/.timestamp" -nt $file ] && return 0 done return 1 } -- cgit