summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2003-11-04 18:22:36 +0000
committerAndreas Gruenbacher <agruen@suse.de>2003-11-04 18:22:36 +0000
commitaa2e20e1d6d2eef546613da566276b93c856de15 (patch)
treeec509cecc4c5db4bc8f3dd5be5603ec1cfa02063
parent2ed205ce9191d6787857b55a2a3046401f78d8f8 (diff)
downloadquilt-aa2e20e1d6d2eef546613da566276b93c856de15.tar.gz
- Fix the timestamp check in scripts/rpatch.in for missing files.
-rw-r--r--quilt.changes1
-rwxr-xr-xscripts/rpatch.in12
2 files changed, 5 insertions, 8 deletions
diff --git a/quilt.changes b/quilt.changes
index bc05f7a..ee85a09 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -5,6 +5,7 @@ Tue Nov 4 16:51:49 CET 2003 - agruen@suse.de
- Fix the check for modified patches: That broke with the .pc file
removal.
- `quilt setup' sometimes forgot to create the patches sub-dir.
+- Fix the timestamp check in scripts/rpatch.in for missing files.
-------------------------------------------------------------------
Fri Oct 31 16:59:06 CET 2003 - agruen@suse.de
diff --git a/scripts/rpatch.in b/scripts/rpatch.in
index fd83e0d..eeb1363 100755
--- a/scripts/rpatch.in
+++ b/scripts/rpatch.in
@@ -28,22 +28,18 @@ files_may_have_changed()
local patch=$1 file
local patch_file=$(patch_file_name $patch)
- local apply_t ts
- apply_ts=$(date -r ".pc/$patch/.timestamp" '+%s')
-
if [ $? -ne 0 -o ! -e "$patch_file" -o ! -e ".pc/$patch/.timestamp" \
-o ".pc/$patch/.timestamp" -ot "$patch_file" ]
then
return 0
fi
+ local apply_ts=$(date -r ".pc/$patch/.timestamp" '+%s') ts
for file in $(files_in_patch $patch)
do
- ts=$(date -r $file '+%s') 2> /dev/null
- if [ $? -ne 0 -o "$ts" -gt $apply_ts ]
- then
- return 0 # file has changed
- fi
+ ts=$(date -r $file '+%s' 2> /dev/null)
+ [ -z "$ts" ] && return 0
+ [ "$ts" -gt $apply_ts ] && return 0
done
return 1
}