diff options
-rw-r--r-- | TODO | 6 | ||||
-rw-r--r-- | quilt.changes | 7 | ||||
-rwxr-xr-x | scripts/apatch.in | 22 |
3 files changed, 31 insertions, 4 deletions
@@ -78,3 +78,9 @@ apatch: inject the patch in its proper position in applied-patches. Needs to check if any of the files in the patch are touched by later patches. + +quilt diff: + + - The number of contetx lines cannot be overridden in QUILT_DIFF_OPTS: + GNU diff uses three context lines as soon as -u or -U3 is on the + command line, no matter which order of arguments. diff --git a/quilt.changes b/quilt.changes index 6e285d6..11db26e 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Oct 29 17:19:24 CET 2003 - agruen@suse.de + +- If a patch does not apply cleanly and `quilt push' removes + rejects files it GNU patch left behind, change the output from + ``saving rejects to file x.rej'' to ``rejects in file x''. + +------------------------------------------------------------------- Tue Oct 28 14:51:07 CET 2003 - agruen@suse.de - Remove .pc/*/.pc files, and adjust various scripts accordingly. diff --git a/scripts/apatch.in b/scripts/apatch.in index 69f327f..511f878 100755 --- a/scripts/apatch.in +++ b/scripts/apatch.in @@ -47,7 +47,7 @@ interrupt() apply_patch() { local patch=$1 - local patch_file=$(patch_file_name $patch) + local patch_file=$(patch_file_name $patch) output if ! [ -s $patch_file ] then @@ -57,18 +57,31 @@ apply_patch() if [ "x${patch_file:(-3)}" = "x.gz" ] then + output="$( gzip -cd $patch_file \ | @PATCH@ $(patch_args $patch) --backup --prefix=".pc/$patch/" \ - -E $silent $force_apply + -E $silent $force_apply 2>&1 )" elif [ "x${patch_file:(-4)}" = "x.bz2" ] then + output="$( bzip2 -cd $patch_file \ | @PATCH@ $(patch_args $patch) --backup --prefix=".pc/$patch/" \ - -E $silent $force_apply + -E $silent $force_apply 2>&1 )" else + output="$( @PATCH@ $(patch_args $patch) --backup --prefix=".pc/$patch/" \ - -E $silent -i $patch_file $force_apply + -E $silent -i $patch_file $force_apply 2>&1 )" fi + status=${PIPESTATUS[0]} + if [ $status -ne 0 -a -z "$opt_leave_rejects" ] + then + # The reject files are removed in rollback_patch. + echo "$output" \ + | sed -e 's/-- saving rejects to file \(.\+\)\.rej/-- rejects in file \1/' + else + echo "$output" + fi + return $status } apatch() @@ -152,6 +165,7 @@ fi [ -n "$opt_quiet" ] && silent=-s [ -z "$opt_verbose" ] && silent_unless_verbose=-s [ -z "$opt_interactive" ] && force_apply=-f +[ -n "$opt_force" ] && opt_leave_rejects=1 patch=$(stripit $1) |