From: Jean Delvare Subject: compat/getopt: Handle a second separator getopt can be passed 2 '--' separators. The first one tells that getopt options are over and target program options start. The second one tells that the target program's options are over and following arguments should be treated as non-options even if they look like options. This second separator was not handled, causing the compatibility getopt script to treat the following arguments as options, eventually failing one way or another. Properly detect and handle the second separator. This fixes the first half of bug #54772: https://savannah.nongnu.org/bugs/index.php?54772 Signed-off-by: Jean Delvare --- compat/getopt.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) --- quilt.orig/compat/getopt.in 2018-10-03 15:23:21.147620172 +0200 +++ quilt/compat/getopt.in 2018-10-03 16:05:56.818667040 +0200 @@ -8,12 +8,12 @@ use strict; -my $opts; +my $opts = ''; my @words; my $found_sep = 0; foreach my $arg (@ARGV) { - if ($arg eq '--') { + if (!$found_sep && $arg eq '--') { $found_sep = 1; } else { @@ -62,10 +62,17 @@ sub quote_word return "'$word'"; } +# there can be a second separator, to inhibit processing following arguments +# as options +$found_sep = 0; foreach my $word (@words) { + if ($word eq '--') { + $found_sep = 1; + next; + } # allow '-' to be an option value - if (!$need_param && $word !~ /^-./) { + if ($found_sep || (!$need_param && $word !~ /^-./)) { push @barewords, quote_word($word); next; } '0ec1833c1f18027ef71231f37ade182f76b3c0f2'/>
AgeCommit message (Expand)Author
2021-12-13gnu: Simplify package inputs....This commit was obtained by running: ./pre-inst-env guix style without any additional argument. Ludovic Courtès
2021-10-18Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe
2021-10-18gnu: python-pylibacl: Add missing brace in description....Regression introduced in 133f780039e63798535e4f52a4d9f1810ea5b2ab. * gnu/packages/acl.scm (python-pylibacl)[description]: Add missing brace. Ludovic Courtès
2021-10-15gnu: python-pylibacl: Improve description....* gnu/packages/acl.scm (python-pylibacl)[synopsis]: Use @acronym{}. [description]: Turn into a full sentence, mark up, and edit for GNU. Tobias Geerinckx-Rice
2021-10-15gnu: python-pylibacl: Do not return #t from custom phases....* gnu/packages/acl.scm (python-pylibacl)[arguments]: Don't explicitly return #t from phases. Tobias Geerinckx-Rice
2021-07-23gnu: acl: Update to 2.3.1....* gnu/packages/acl.scm (acl): Update to 2.3.1. Marius Bakke