Current getopt_long from the glibc-2.27-alt1 output: $ LANG=C getopt -a -n TEST -o 'a,b,c' -l 'caa:,cba:' -- -c='AAA' TEST: option '-c=AAA' is ambiguous; possibilities: '-caa' '-cba' but before the output was: $ LANG=C getopt -a -n TEST -o 'a,b,c' -l 'caa:,cba:' -- -c='AAA' TEST: option '-c=AAA' is ambiguous; possibilities: '--caa' '--cba' Some tests in libshell and util-linux compare the output of getopt command to the reference output. These tests broke. The new error output does not look correct because the variants are searched among the long options. Also the `-cba' is more like a shortened `-c -b -a'. Do I have to correct tests for a new message everywhere?
The change of error output is a side effect of commit glibc-2.26~634: https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=glibc-2.25.90-191-gaeacb9f The commit message does not look as if the side effect was intended.
Will the error message be fixed ?
It was easy to miss that prefix variable does not always contain `--'. It looks like glibc doesn't have enough tests for getopt_long. :))
Forwarded to https://sourceware.org/bugzilla/show_bug.cgi?id=22939