Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439490 - init script install_qa_check not strict enough
Summary: init script install_qa_check not strict enough
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 431026
  Show dependency tree
 
Reported: 2012-10-24 09:25 UTC by Patrick Lauer
Modified: 2012-10-26 20:12 UTC (History)
2 users (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 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.