Bug 8851

Summary: Add bashism checks for shell script functions
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: jose.perez.carranza, junhuix.zhang, meta.mr.watcher, meta.watcher, richard.purdie
Version: 2.0   
Target Milestone: 2.2 M4   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

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.