quilt/setup-support-reverse-patch.patch
Jean Delvare 58385cd065 - setup-add-fuzz-parameter.patch: Add a --fuzz parameter to quilt
setup and inspect (bnc#615073).
- setup-support-reverse-patch.patch: Handle reverted patches in
  spec files (bnc#615065).

OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=22
2010-06-21 09:29:44 +00:00

41 lines
936 B
Diff

From: Jean Delvare <jdelvare@suse.de>
Subject: Handle reverted patches in spec files
References: bnc#615065
Let inspect (and thus quilt setup) handle reversed patches
in spec files.
---
quilt/scripts/inspect.in | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
--- quilt-0.48.orig/quilt/scripts/inspect.in
+++ quilt-0.48/quilt/scripts/inspect.in
@@ -185,6 +185,18 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
fi
}
+ # Extract the -R option from the command line
+ reverse_option() {
+ while [ $# -ne 0 -a "$1" != -R ]
+ do
+ shift
+ done
+ if [ "$1" = -R ]
+ then
+ echo $1
+ fi
+ }
+
patch_input_file() {
while [ $# -gt 0 ]; do
case "$1" in
@@ -244,7 +256,7 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
patch)
echo -n p >&4
echo "${0##*/} ${dir:-.} $unpackfile" \
- $(strip_option "$@") >&3
+ $(strip_option "$@") $(reverse_option "$@") >&3
;;
tar)
echo -n t >&4