Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510192 - dev-util/checkbashisms-2.0.0.5 failure with string quotes
Summary: dev-util/checkbashisms-2.0.0.5 failure with string quotes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robin Johnson
URL: http://sourceforge.net/p/checkbaskism...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-12 20:51 UTC by Robin Johnson
Modified: 2015-11-11 00:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-05-12 20:51:17 UTC
The following line is valid POSIX SH (confirmed on 'posh' shell), but checkbashisms fails it:
eval "x_$cmd() { explain $cmd "'"$@"'"; }"

Here is a workaround for the moment (notice added spaces around the middle token)
eval "x_$cmd() { explain $cmd " '"$@"' "; }"

This suggests that checkbashisms has a bad tokenizer.

All credit for the bug to my GSoC student, rabisg (guha.rabishankar).

Keeping this open until upstream resolves it.
Comment 1 SpanKY gentoo-dev 2015-11-11 00:53:17 UTC
i switched us to the latest Debian version (which is where checkbashisms forked from in the first place) and it doesn't warn on this code

http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd43e9ac265acdd453bf060cd2ee40cb946674d