This is downstream bug report https://bugzilla.altlinux.org/34623: "The current getopt_long output from glibc >= 2.26 is: $ 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 in glibc <= 2.25 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'."
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.
On the other hand, the new message follows the spelling of the argument: $ getopt -a -n TEST -o 'a,b,c' -l 'caa:,cba:' -- --c='AAA' TEST: option '--c=AAA' is ambiguous; possibilities: '--caa' '--cba' -caa is a completion of -c and --caa is a completion of --c, but not the other way round.