diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-12-04 22:55:46 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-12-05 00:08:28 +0100 |
commit | c16c119d0a7894c42bbe816ec381a0f458f26e6a (patch) | |
tree | ecc05876c10ce19cfbb7ae1dc53b495246380e40 /gnu/packages/patches/quilt-getopt-nondigit-param.patch | |
parent | 040ae1881952c90dae9478e5cfff6aad0ce950da (diff) |
gnu: quilt: Use shorter file names for patches.
We were reaching the 99-character limit of POSIX tar.
* gnu/packages/patches/quilt-compat-getopt-fix-option-with-nondigit-param.patch:
Rename to...
* gnu/packages/patches/quilt-getopt-nondigit-param.patch: ... this.
* gnu/packages/patches/quilt-compat-getopt-fix-second-separator.patch:
Rename to...
* gnu/packages/patches/quilt-getopt-second-separator.patch: ... this.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/patchutils.scm (quilt)[source](patches): Likewise.
Diffstat (limited to 'gnu/packages/patches/quilt-getopt-nondigit-param.patch')
-rw-r--r-- | gnu/packages/patches/quilt-getopt-nondigit-param.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/patches/quilt-getopt-nondigit-param.patch b/gnu/packages/patches/quilt-getopt-nondigit-param.patch new file mode 100644 index 0000000000..6bbec67e75 --- /dev/null +++ b/gnu/packages/patches/quilt-getopt-nondigit-param.patch @@ -0,0 +1,45 @@ +From: Jean Delvare <jdelvare@suse.de> +Subject: compat/getopt: Allow non-digit parameter embedded in short option + +The compatibility getopt script allows only digit parameters to be +embedded in short options. Util-linux's getopt implementation does +not have such a restriction and allows any parameter to be embedded +in short options. As a consequence, using the compatibility getopt +script would choke for example on "-pab", which is a legal option +of the "quilt refresh" command. + +Remove the limitation on digits so that the compatibility getopt +script allows what util-linux allows. This fixes the second half +of bug #54772: +https://savannah.nongnu.org/bugs/index.php?54772 + +As a side note, this feature of the compatibility script was broken +anyway, as it would output the digits in reverse order. + +Signed-off-by: Jean Delvare <jdelvare@suse.de> +--- + compat/getopt.in | 13 ++++--------- + 1 file changed, 4 insertions(+), 9 deletions(-) + +--- quilt.orig/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 ++++ quilt/compat/getopt.in 2018-10-03 16:12:17.624841732 +0200 +@@ -108,15 +108,10 @@ foreach my $word (@words) { + if (scalar(@letters) == 0) { + $need_param = $letter; + } else { +- # short options can have numerical args +- # embedded in the short option list: -UO +- die "unexpected character after option $letter" +- if ($letters[$#letters] !~ /[0-9]/); +- my @digits; +- while (scalar(@letters) && ($letters[$#letters] =~ /[0-9]/)) { +- push @digits, pop @letters; +- } +- push @options, quote_word(join('', reverse @digits)); ++ # short options can have args ++ # embedded in the short option list ++ push @options, quote_word(join('', reverse @letters)); ++ @letters = (); + } + } + } |