Bug 8851 - Add bashism checks for shell script functions
Summary: Add bashism checks for shell script functions
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.0
Hardware: All Multiple
: Medium+ enhancement
Target Milestone: 2.2 M4
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
: 8932 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-22 19:35 UTC by Paul Eggleton
Modified: 2017-12-06 16:51 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2015-12-22 19:35:14 UTC
Seeing as we often have the issue of bashisms turning up in shell functions and therefore failing on Ubuntu, we should add some kind of check for these if it's practical to do so. Presumably this would use checkbashisms. 

I don't know if it will be practical to do this as a normal QA check; if we have to do it externally that would be acceptable.
Comment 1 Richard Purdie 2016-01-07 15:47:38 UTC
Since we parse the shell functions, could the parser check for these?
Comment 2 Paul Eggleton 2016-01-17 22:21:51 UTC
*** Bug 8932 has been marked as a duplicate of this bug. ***
Comment 3 Ross Burton 2016-02-11 12:07:40 UTC
checkbashisms is 26k of perl, so I don't fancy reimplementing that in Python to be honest!
Comment 4 Ross Burton 2016-02-11 12:08:49 UTC
I'm thinking a bit of tooling to extract all the shell scripts from the metadata and run it through checkbashisms would be more practical that verifying on every parse.
Comment 5 Ross Burton 2016-02-11 23:26:47 UTC
Well I've made a prototype and it bloody well works!  checkbashism is far too slow to do on parse.
Comment 6 Ross Burton 2016-09-19 12:42:14 UTC
Merge in oe-core d77fe838ab7631a19e90ff4226f0712e54aa4e22.