[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] patch-wrapper.test fails when using --without-getopt
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] patch-wrapper.test fails when using --without-getopt |
Date: |
Sat, 15 Apr 2006 17:13:27 +0200 |
Hi Markus,
> I'm not sure if this is a big problem, but currently the test suite fails
> when configuring using --without-getopt.
> (...)
> [patch-wrapper.test]
> [1] $ rm -rf d -- ok
> [2] $ mkdir -p d/somewhere -- ok
> [3] $ cd d -- ok
> [5] $ cat > foo.orig -- ok
> [11] $ sed -e 's/3/3a/' foo.orig > foo -- ok
> [12] $ diff -u foo.orig foo > foo.diff -- ok
> [13] $ mv foo.orig foo -- ok
> [15] $ patch-wrapper -s -p0 < foo.diff -- failed
> illegal option: s at /home/mfx/tmp/quilt/compat/getopt line 78. != ~
> [16] $ quilt pop -q -- failed
> ....
Good catch, thanks for reporting. This is caused by patch-wrapper
passing a -q option to getopt, which our compat/getopt script doesn't
handle and chokes on. The minimal patch below fixes it and makes the
test suite pass again, by having compat/getopt ignore the -q option.
Index: compat/getopt.in
===================================================================
RCS file: /cvsroot/quilt/quilt/compat/getopt.in,v
retrieving revision 1.3
diff -u -r1.3 getopt.in
--- compat/getopt.in 15 Apr 2006 14:54:16 -0000 1.3
+++ compat/getopt.in 15 Apr 2006 15:03:39 -0000
@@ -38,7 +38,8 @@
# nothing fancy to see here; this script provides minimal compatibility
# with the getopt from util-linux until a cross platform binary exists.
-if ($opts =~ /^\s*-o ([a-zA-Z:]*)?(\s+--long .*)*/) {
+# We silently ignore option -q.
+if ($opts =~ /^\s*(?:-q\s+)?-o ([a-zA-Z:]*)?(\s+--long .*)*/) {
$short_opts = $1;
if ($2) {
my $long_opts = $2;
However, this means that patch-wrapper will print error messages before
falling back to patch when compat/getopt is used, instead of being
quiet as it is supposed to be in this case. I don't think it's worth
fixing, but I am not relying on compat/getopt and I am not using
patch-wrapper either (what is it for?) so others may have different
opinions. Thus I will wait for comments before applying the patch above.
--
Jean Delvare
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Quilt-dev] patch-wrapper.test fails when using --without-getopt,
Jean Delvare <=