Bug 8983

Summary: No warning for variable written low case in local.conf; it's just ignored
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED DUPLICATE QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher
Version: 2.1   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: New (Never tested)
Verified: Documentation change: Don't know

Description Bogdan Alexandru Voiculescu 2016-01-22 07:51:20 UTC
Adding in local.conf this line: 
inherit+="distrodata" , will do no change. 

The variable is ignored, with no warning. 
We could add a warning at runtime, or add a Note in MegaManual. 

If there is a rule, that all variables should be UpperCase, then UpperCase all of them, regardless how are written in local.conf and display a warning for compliance.


Effects: 
I lost two days trying to use this indications and run: 
Tested on a network with proxy, adding 'inherit +="distrodata"' on local.conf
with the following commands

    for distrotask in distrodataall distro_checkall checklicenseall; do
        bitbake universe -c $distrotask
    done
Comment 1 Paul Eggleton 2016-01-22 11:04:15 UTC
I'd already noted this issue in bug 5426. We could detect and warn/error for this specific issue, but it is worth noting that this is an unfortunate consequence of the design of the language - there is no warning for using an "incorrect" variable; the system is open-ended, just as shell scripts are for example. We might fix this one but there are probably infinite other ways you could typo a variable name or other construct and there's no practical way I can think of for us to generally guard against that.

Also, FYI not all variables are uppercase; for example, functions are actually variables and they are typically lower case, and there are numerous other counter-examples.

*** This bug has been marked as a duplicate of bug 5426 ***
Comment 2 Bogdan Alexandru Voiculescu 2016-01-22 12:47:14 UTC
Well, at least a Note in documentation will help to warn people to be careful when using variable Upper or Lower; since it is case sensitive.
Comment 3 Bogdan Alexandru Voiculescu 2016-01-22 12:50:51 UTC
verified