<?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>8523</bug_id>
          
          <creation_ts>2015-10-15 15:28:36 +0000</creation_ts>
          <short_desc>[regression] d.setVar() + d.delVar() affect _overrides</short_desc>
          <delta_ts>2015-10-16 10:30:43 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Enrico Scholz">enrico.scholz</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55362</commentid>
    <comment_count>0</comment_count>
    <who name="Enrico Scholz">enrico.scholz</who>
    <bug_when>2015-10-15 15:28:36 +0000</bug_when>
    <thetext>When modifying a variable with &apos;d.setVar()&apos; or &apos;d.delVar()&apos;, _override variants seem to be changed too.  E.g. script below gives with old bitbake &apos;good&apos; while recent master (c7cb8255d0) gives &apos;none&apos;:

----
LICENSE = &quot;XX&quot;
VAR_cond0 = &quot;good&quot;

python () {
    d.delVar(&apos;VAR&apos;)
    d.setVar(&quot;OVERRIDES&quot;,  &quot;cond0&quot;);
    d.finalize(False)
    bb.warn(&quot;--&gt; %s&quot; % d.getVar(&quot;VAR&quot;, True))
}
----

$ ./bitbake --version
BitBake Build Tool Core version 1.28.0

$ ./bitbake -b test.bb
...
WARNING: --&gt; None

---
$ ./bitbake --version
BitBake Build Tool Core version 1.26.0, bitbake version 1.26.0


$ ./bitbake -b test.bb
...
WARNING: --&gt; good</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55384</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-10-16 10:14:07 +0000</bug_when>
    <thetext>This is as a result of the overrides code changes. You can get the old behaviour if you use setVar(xxx, parsing=True) which is what bitbake is doing internally.

This was given a lot of long hard thought about what the user really wants/needs and what the current metadata assumed. It seemed that in 99.9% cases outside of the bitbake core, it would be more useful to affect overrides than not and most code I tested against didn&apos;t have any issues with the behaviour.

I think what ended up convincing me that this was the right way to go was that otehrwise, there is no way to undo overrides. The user clearly does actually need/want to do that in many scenarios. With the parameter you can do both. Admittedy its not well documented yet, I&apos;m torn on whether it should be a publicly used API or not, although that is probably inevitable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55387</commentid>
    <comment_count>2</comment_count>
    <who name="Enrico Scholz">enrico.scholz</who>
    <bug_when>2015-10-16 10:30:43 +0000</bug_when>
    <thetext>is &apos;parsing=True&apos; for delVar() planned too?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>