Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 439490

Summary: init script install_qa_check not strict enough
Product: Portage Development Reporter: Patrick Lauer <patrick>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: kensington, qa
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 431026    

Description Patrick Lauer gentoo-dev 2012-10-24 09:25:12 UTC
* Call stack:
 *   misc-functions.sh, line 1274:  Called install_qa_check
 *   misc-functions.sh, line  557:  Called die
 * The specific snippet of code:
 *                      bash -n "${i}" || die "The init.d file has syntax errors: ${i}"


Since init scripts should be posix sh this check may not be strict enough. Bashisms should not be tolerated!
Comment 1 Zac Medico gentoo-dev 2012-10-24 17:10:32 UTC
The bash --posix option doesn't seem to help. I suppose that we could use dash instead, if it happens to be installed.
Comment 2 Michael Palimaka (kensington) gentoo-dev 2012-10-24 17:13:30 UTC
(In reply to comment #1)
> I suppose that we could use dash instead, if it happens to be installed.

If you're considering the use of external programs, perhaps dev-util/checkbashisms will be of interest.
Comment 3 Zac Medico gentoo-dev 2012-10-25 03:22:43 UTC
It's fixed to use checkbashisms when available:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f48625c547398ee5f92d33e16b1a837c3c595ae9
Comment 4 Zac Medico gentoo-dev 2012-10-26 20:12:43 UTC
This is fixed in 2.1.11.31 and 2.2.0_alpha142.