Bug 7633

Summary: Parser does not error out on unclosed function
Product: [Build System, Metadata & Runtime] BitBake Reporter: Paul Eggleton <bluelightning>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: VERIFIED FIXED QA Contact: Cristina Agurida <cristina-danielax.agurida>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, cristina-danielax.agurida, poky.bs.watcher, poky.watcher
Version: 1.7   
Target Milestone: 1.9 M1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2015-04-20 14:51:59 UTC
If you have a recipe with an unclosed function before EOF then you'd expect an error, but you don't get one - here's a trivial reproducer:

-------- snip ---------
LICENSE = "CLOSED"
SRC_URI = ""

do_install() {
        echo "hello"

inherit autotools gettext
-------- snip ---------

This recipe builds without error. It seems the do_install function isn't even used, the default implementation is used instead.
Comment 1 Paul Eggleton 2015-05-13 09:21:54 UTC
A related issue I just discovered - apparently if your closing } is not the first character on the line it also triggers the same behaviour (the function definition is completely ignored).
Comment 3 Cristina Agurida 2015-06-25 10:43:54 UTC
Verified on master: 8ef99a00dc75c6eed87aa1bc1528614a2a27eddf