diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2003-11-04 15:53:15 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2003-11-04 15:53:15 +0000 |
commit | 477c8a0b21b5f546904574e630139736cdaf2951 (patch) | |
tree | 1fc7a384a3ae98a0ed854cad0e6dd538962caf3b /scripts/rpatch.in | |
parent | 11006bdc9ed6c400cca019886f395febc9110b06 (diff) | |
download | quilt-477c8a0b21b5f546904574e630139736cdaf2951.tar.gz |
- Add failpop.test that checks if modified patches are recognized.
- Fix the check for modified patches: That broke with the .pc file
removal.
Diffstat (limited to 'scripts/rpatch.in')
-rwxr-xr-x | scripts/rpatch.in | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/rpatch.in b/scripts/rpatch.in index ca8bc49..fd83e0d 100755 --- a/scripts/rpatch.in +++ b/scripts/rpatch.in @@ -28,22 +28,19 @@ files_may_have_changed() local patch=$1 file local patch_file=$(patch_file_name $patch) - local apply_ts=$(date -r ".pc/$patch" '+%s') ts + local apply_t ts + apply_ts=$(date -r ".pc/$patch/.timestamp" '+%s') - if [ -e "$patch_file" -a ".pc/$patch" -ot "$patch_file" ] + if [ $? -ne 0 -o ! -e "$patch_file" -o ! -e ".pc/$patch/.timestamp" \ + -o ".pc/$patch/.timestamp" -ot "$patch_file" ] then return 0 fi for file in $(files_in_patch $patch) do - if ! [ -e $file ] - then - return 0 # file is missing - fi - - ts=$(date -r $file '+%s') - if [ $? -ne 0 -o $ts -gt $apply_ts ] + ts=$(date -r $file '+%s') 2> /dev/null + if [ $? -ne 0 -o "$ts" -gt $apply_ts ] then return 0 # file has changed fi @@ -140,6 +137,7 @@ rpatch() if [ $status -eq 0 ] then echo $"Removing $patch" + rm -f ".pc/$patch/.timestamp" @LIB@/backup-files $silent -f $pc_file -B .pc/$patch/ -r status=$? remove_from_db $patch |