[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFH: bashisms in configure script


Given the recent responses I'm providing some more info, updates, and hints.

Raphael Geissert wrote:
> This doesn't necessarily mean that we are drowned by bashisms, as some of
> those may already be fixed by Debian- provided packages or might affect
> unused code


> (before anybody asks/complains, the list of maintainers is too big to be
> attached to the email, even if compressed.)

If you were one of those who checked the dd-list.txt file right after I sent 
my original email and up to two hours later, please re-check it. It was 

dd-list.txt *only* contains the list of maintainers/packages with bashisms 
in a 'configure' script. A new list for maintainers/packages with any kind 
of bashism (or false positive) in any file can now be found at:

Information about bashisms (how to fix them) and how to understand 
checkbashisms' output can be found at:


* Common false positive:

possible bashism in ./configure line nnn (should be >word 2>&1):
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3

This one is safe. It is generated by autoconf and $3 points to a numeric 
file descriptor.

some sort of detection in *.diff or *.dpatch files
In this case those files use a shell wrapper that executes another program 
to process the file. checkbashisms attempts to detect them, but it fails in 
some cases.

"unsafe echo with backslash:"
If the output of echo is piped to grep, verified with test/[ or case; in 
most cases it is just some shell code that is used to determine whether the 
"echo" command expands backlashes by default.

* Not false positives, just indicators[1], but common too:

[1] they help identify shell tests.

Yes, I'm aware of the high number of false positives and indicators noise. 
There are some false negatives too.

Raphael Geissert - Debian Developer
www.debian.org - get.debian.net

Reply to: