<?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>6037</bug_id>
          
          <creation_ts>2014-03-25 11:21:54 +0000</creation_ts>
          <short_desc>The _remove variable suffix does not work correctly for variables used multiple times</short_desc>
          <delta_ts>2014-03-25 22:33:02 +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.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.6 M5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Kjellerstedt">peter.kjellerstedt</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>olof.johansson</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</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>41673</commentid>
    <comment_count>0</comment_count>
      <attachid>1852</attachid>
    <who name="Peter Kjellerstedt">peter.kjellerstedt</who>
    <bug_when>2014-03-25 11:21:54 +0000</bug_when>
    <thetext>Created attachment 1852
Make _remove work correctly

If the _remove variable suffix is used on a variable that is then used multiple times within a recipe, the _remove will only apply to the first use of the variable. E.g., add the following to any recipe: 

FOO = &quot;foo bar&quot;
FOO_remove = &quot;bar&quot;
FOO_FOO = &quot;${FOO} ${FOO}&quot;

do_foo_foo[nostamp] = &quot;1&quot;
do_foo_foo() {
        bbnote &quot;FOO_FOO: ${FOO_FOO}&quot;
}
addtask foo_foo

and look at the output from the foo_foo task. It will say:

NOTE: FOO_FOO: foo foo bar

rather than the expected:

NOTE: FOO_FOO: foo foo

I have attached a patch that I got from Richard Purdie when I fist discovered the problem. It does solve the problem, but I think he was not happy with the solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41728</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2014-03-25 22:33:02 +0000</bug_when>
    <thetext>Fxied in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=39846ddbce87d26eb68870914bf86a8ce5e86e5c

I also added a test case for bitbake-selftest.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1852</attachid>
            <date>2014-03-25 11:21:54 +0000</date>
            <delta_ts>2014-03-25 11:21:54 +0000</delta_ts>
            <desc>Make _remove work correctly</desc>
            <filename>smart_data.py.patch</filename>
            <type>text/plain</type>
            <size>741</size>
            <attacher name="Peter Kjellerstedt">peter.kjellerstedt</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL2JpdGJha2UvbGliL2JiL2RhdGFfc21hcnQucHkgYi9iaXRiYWtlL2xpYi9i
Yi9kYXRhX3NtYXJ0LnB5CmluZGV4IDc0MmM3ZmIuLjhlZGNhOWUgMTAwNjQ0Ci0tLSBhL2JpdGJh
a2UvbGliL2JiL2RhdGFfc21hcnQucHkKKysrIGIvYml0YmFrZS9saWIvYmIvZGF0YV9zbWFydC5w
eQpAQCAtNjE0LDYgKzYxNCwxMyBAQCBjbGFzcyBEYXRhU21hcnQoTXV0YWJsZU1hcHBpbmcpOgog
ICAgICAgICAgICAgZmlsdGVyZWQgPSBmaWx0ZXIobGFtYmRhIHY6IHYgbm90IGluIGxvY2FsX3Zh
clsiX3JlbW92ZWFjdGl2ZSJdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUu
c3BsaXQoIiAiKSkKICAgICAgICAgICAgIHZhbHVlID0gIiAiLmpvaW4oZmlsdGVyZWQpCisgICAg
ICAgICAgICBpZiBleHBhbmQ6CisgICAgICAgICAgICAgICAgY2FjaGVuYW1lID0gTm9uZQorICAg
ICAgICAgICAgICAgIGlmIGZsYWcgPT0gIl9jb250ZW50IjoKKyAgICAgICAgICAgICAgICAgICAg
Y2FjaGVuYW1lID0gdmFyCisgICAgICAgICAgICAgICAgZWxzZToKKyAgICAgICAgICAgICAgICAg
ICAgY2FjaGVuYW1lID0gdmFyICsgIlsiICsgZmxhZyArICJdIgorICAgICAgICAgICAgICAgIHNl
bGYuZXhwYW5kX2NhY2hlW2NhY2hlbmFtZV0udmFsdWUgPSB2YWx1ZQogICAgICAgICByZXR1cm4g
dmFsdWUKIAogICAgIGRlZiBkZWxWYXJGbGFnKHNlbGYsIHZhciwgZmxhZywgKipsb2dpbmZvKToK
</data>

          </attachment>
      

    </bug>

</bugzilla>