summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2011-03-25 19:51:13 +0100
committerJean Delvare <jdelvare@suse.de>2011-03-25 19:51:13 +0100
commit4b38786ab83b3d804ee31c317d85f695dee05252 (patch)
treef96795006a03698a785e83b4151390d1c03bfd4c
parentb0baeeb6b61132af92fd75df5f912554d295dee1 (diff)
downloadquilt-4b38786ab83b3d804ee31c317d85f695dee05252.tar.gz
configure.ac: Fix test for GNU patch version
We currently ask for GNU patch >= 2.4, but the test suite doesn't actually pass with GNU patch 2.4. It passes with GNU patch 2.5 with minor edits to be more tolerant to the exact output of "patch". I have no idea how much work it would be to get 2.4 to be supported again, but it doesn't seem unreasonable to ask for 2.5 which was released in August 1997. So let's just do that for now. If anyone badly misses support for GNU patch 2.4, well, we accept patches ;) Signed-off-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r--configure.ac4
-rw-r--r--quilt.changes5
-rw-r--r--test/create-delete.test6
-rw-r--r--test/half-applies.test14
4 files changed, 17 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 1da515a..093ca83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -272,7 +272,7 @@ if $PATCH --version 2> /dev/null | grep GNU >/dev/null; then
set -- $patch_version
IFS=$saved_IFS
set -- `echo $1 | $TR -cd 0-9` `echo $2 | $TR -cd 0-9`
- if test 0$1 -lt 2 || test 0$1 -eq 2 -a 0$2 -lt 4 ; then
+ if test 0$1 -lt 2 || test 0$1 -eq 2 -a 0$2 -lt 5 ; then
patch_version=
fi
else
@@ -280,7 +280,7 @@ else
fi
if test -z "$patch_version" ; then
AC_MSG_ERROR([
-$PACKAGE_NAME requires at least version 2.4 of GNU patch. You can download a
+$PACKAGE_NAME requires at least version 2.5 of GNU patch. You can download a
current version of patch from ftp.gnu.org, or if you already have GNU patch
then you can supply its path with the '--with-patch=' option.
])
diff --git a/quilt.changes b/quilt.changes
index cfc70df..2a9487e 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Fri Mar 25 19:50:44 CET 2011 - jdelvare@suse.de
+
+- configure.ac: Fix test for GNU patch version.
+
+-------------------------------------------------------------------
Fri Mar 25 18:47:53 CET 2011 - jdelvare@suse.de
- quilt/diff.in, quilt/refresh.in: Accept file names with spaces.
diff --git a/test/create-delete.test b/test/create-delete.test
index 315edb8..43a0cf4 100644
--- a/test/create-delete.test
+++ b/test/create-delete.test
@@ -28,12 +28,12 @@ file creates and deletions.
$ echo create > create
$ rm -f delete
$ patch -p1 --dry-run < patches/test.diff
- > The next patch would create the file create,
+ >~ The next patch would create the file `?create'?,
> which already exists! Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
- >~ 1 out of 1 hunk ignored( -- saving rejects to file create.rej)?
- > The next patch would delete the file delete,
+ >~ 1 out of 1 hunk ignored( -- saving rejects to( file)? create.rej)?
+ >~ The next patch would delete the file `?delete'?,
> which does not exist! Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
diff --git a/test/half-applies.test b/test/half-applies.test
index 258b225..1702a03 100644
--- a/test/half-applies.test
+++ b/test/half-applies.test
@@ -11,23 +11,23 @@ $ mv bar.orig bar
$ echo foorab.diff -p0 > patches/series
$ quilt push
> Applying patch patches/foorab.diff
-> patching file foo
-> patching file bar
+>~ patching file `?foo'?
+>~ patching file `?bar'?
> Hunk #1 FAILED at 1.
-> 1 out of 1 hunk FAILED -- rejects in file bar
+>~ 1 out of 1 hunk FAILED -- rejects in file `?bar'?
> Patch patches/foorab.diff does not apply (enforce with -f)
$ quilt push
> Applying patch patches/foorab.diff
-> patching file foo
-> patching file bar
+>~ patching file `?foo'?
+>~ patching file `?bar'?
> Hunk #1 FAILED at 1.
-> 1 out of 1 hunk FAILED -- rejects in file bar
+>~ 1 out of 1 hunk FAILED -- rejects in file `?bar'?
> Patch patches/foorab.diff does not apply (enforce with -f)
$ quilt push -qf
> Applying patch patches/foorab.diff
-> 1 out of 1 hunk FAILED -- saving rejects to file bar.rej
+>~ 1 out of 1 hunk FAILED( -- saving rejects to( file)? bar.rej)?
> Applied patch patches/foorab.diff (forced; needs refresh)
$ quilt diff