<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5426</bug_id>
          
          <creation_ts>2013-10-30 16:58:03 +0000</creation_ts>
          <short_desc>Detect and fail if inherit is used in conf file</short_desc>
          <delta_ts>2022-06-09 15:07:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>1.5</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>NEWCOMER</status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Gregor Zatko">gzatko</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>gzatko</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>38317</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-10-30 16:58:03 +0000</bug_when>
    <thetext>If for example in local.conf you do this:

  inherit += &quot;buildhistory&quot;

instead of this:

  INHERIT += &quot;buildhistory&quot;

No error will be produced - &quot;inherit&quot; will be treated as a variable since it is not supported in a conf file. BitBake should be erroring out immediately if it sees inherit in a conf file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58132</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-01-22 11:04:15 +0000</bug_when>
    <thetext>*** Bug 8983 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58139</commentid>
    <comment_count>2</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-01-22 12:50:23 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86408</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-02-11 23:20:08 +0000</bug_when>
    <thetext>Gregor, Thanks for taking this enhancement. Hopefully you can make it an error rather than just warning in the documentation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86451</commentid>
    <comment_count>4</comment_count>
    <who name="Gregor Zatko">gzatko</who>
    <bug_when>2020-02-14 19:40:51 +0000</bug_when>
    <thetext>I think that making this issue an error is just a matter of editing the cooker .py files.

However there is a general question from me:
does Yocto have any tool for checking that a keyword is of a valid form?

In other words, if I changed SRC_URI to src_uri in a recipe everything still works. A short cooker BB parser investigation confirm there is no such tool.

If upper written doesn&apos;t correspond with an actual state please correct my thoughts.
If it&apos;s true I&apos;d suggest adding the tool because then every keyword complies with substance of this bug :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86461</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-02-17 12:47:11 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; I think that making this issue an error is just a matter of editing the
&gt; cooker .py files.
&gt; 
&gt; However there is a general question from me:
&gt; does Yocto have any tool for checking that a keyword is of a valid form?

Unfortunately this isn&apos;t really possible as our language is extensible and we don&apos;t have a list of defined variables.

&gt; In other words, if I changed SRC_URI to src_uri in a recipe everything still
&gt; works. A short cooker BB parser investigation confirm there is no such tool.

Correct, I&apos;m not sure its possible to have a generic one either.

&gt; If upper written doesn&apos;t correspond with an actual state please correct my
&gt; thoughts.
&gt; If it&apos;s true I&apos;d suggest adding the tool because then every keyword complies
&gt; with substance of this bug :-)

The inherit/INHERIT mixup is particularly bad as &quot;include&quot; is valid syntax so &quot;inherit&quot; can easily be mixed up.

Adding a test to sanity.bbclass which checks if &quot;inherit&quot; is set as a variable should be an easy way to test/check for the issue without needing to hardcode specifics in bitbake.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87319</commentid>
    <comment_count>6</comment_count>
    <who name="Gregor Zatko">gzatko</who>
    <bug_when>2020-05-23 12:52:25 +0000</bug_when>
    <thetext>Check added, hope it&apos;s a good form.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87336</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-05-26 15:03:33 +0000</bug_when>
    <thetext>Yes, looks good, thanks for the patch! I did tweak the shortlog format and bug reference slightly when merging but its much appreciated!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93454</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-06-09 15:07:28 +0000</bug_when>
    <thetext>https://git.yoctoproject.org/poky/commit/?id=d16186c47cd58fd6d0a0ddd2ba412c8ed1753551</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>