<?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>4425</bug_id>
          
          <creation_ts>2013-04-27 12:09:11 +0000</creation_ts>
          <short_desc>Prevent including the same file twice</short_desc>
          <delta_ts>2013-12-01 02:46:45 +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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</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>32695</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2013-04-27 12:09:11 +0000</bug_when>
    <thetext>We discussed this with Phil on #oe&quot;

When some .inc file is included twice (for some reason) then it has bad side effects especially when the .inc is appending to some variables.

Sometimes it&apos;s not so easy to notice 2nd+ inclusion, I&apos;ve seen some distro configs which were including stuff like tcmode after it was included by default-setup.inc and that was duplicating all *FLAGS in environment..

Or with some cortexa9 machines I would like to include also tune-cortexa8.inc, this way distro can use some common DEFAULTTUNE like cortexa8t-neon when building couple of cortexa[89] MACHINEs. But I cannot include whole tune-cortexa9.inc, because it would include arch-armv7a.inc twice with bad side-effects. So I have to use constructs like this:
https://github.com/shr-distribution/meta-smartphone/blob/shr/meta-samsung/conf/machine/tuna.conf

I&apos;m wondering how many times something is included/required for 2nd+ time and replaces some assignment, but if we really need such use-case then we can introduce include_once/require_once.

Maybe we can start with warning to see how many times something is included more then once and if we don&apos;t find case where such behavior is needed, then change behavior to ignore 2nd+ inclusion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39151</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-11-29 18:16:00 +0000</bug_when>
    <thetext>There is a patch on bitbake-devel which adds the warning. We&apos;d likely make it an error after a while. There was one case in OE-Core of this which I&apos;d sent a patch to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39163</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-11-30 22:33:37 +0000</bug_when>
    <thetext>Warnings added in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f5f3ef7b09ab3790da92f8bef83835033bbeb0ac

Martin: Please remind me to change this to an error at some appropriate point in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39164</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2013-12-01 02:46:45 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Martin: Please remind me to change this to an error at some appropriate
&gt; point in the future.

OK, thanks.

FYI: in my broader world builds I&apos;ve seen only the warning from eglibc-package, but on the other hand it doesn&apos;t many distro-layers which are more likely to have this problem.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>