<?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>10810</bug_id>
          
          <creation_ts>2016-12-14 18:12:29 +0000</creation_ts>
          <short_desc>sanity checks also need to run for multiconfigs</short_desc>
          <delta_ts>2017-03-14 21:29:37 +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>OE-Core</product>
          <component>core</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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>2.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Juro Bystricky">juro.bystricky</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Jose Perez C">jose.perez.carranza</qa_contact>
          <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>69133</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-12-14 18:12:29 +0000</bug_when>
    <thetext>Steps to reproduce:
- create conf/local.conf with BBMULTICONFIG = &quot;foo&quot;
- create conf/multiconfig/foo.conf with MACHINE=&quot;foo&quot;
- bitbake world

Result:
ERROR: ...: Unable to determine endianness for architecture &apos;INVALID&apos;
The error comes from siteconfig.bbclass because HOST_ARCH is not set.

Expected:
The same sanity check error that one gets when using an invalid MACHINE in local.conf, i.e. something like:


ERROR:  OE-core&apos;s config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Please set a valid MACHINE in your local.conf or environment

The error message should mention the multiconfig file in addition to local.conf.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69734</commentid>
    <comment_count>1</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-01-12 00:23:47 +0000</bug_when>
    <thetext>Currently testing running sanity check for all multiconfig builds (including the &quot;default&quot; build):

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 182d044..f6bad36 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1610,7 +1610,9 @@ class BBCooker:
         if self.state != state.parsing and not self.parsecache_valid:
             self.parseConfiguration ()
             if CookerFeatures.SEND_SANITYEVENTS in self.featureset:
-                bb.event.fire(bb.event.SanityCheck(False), self.data)
+
+                for mc in self.multiconfigs:
+                    bb.event.fire(bb.event.SanityCheck(False), self.databuilder.mcdata[mc])
 
             for mc in self.multiconfigs:
                 ignore = self.databuilder.mcdata[mc].getVar(&quot;ASSUME_PROVIDED&quot;) or &quot;&quot;


As for &quot;The error message should mention the multiconfig file in addition to local.conf&quot;, WIP</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69736</commentid>
    <comment_count>2</comment_count>
      <attachid>3593</attachid>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-01-12 00:46:56 +0000</bug_when>
    <thetext>Created attachment 3593
patch file to implement the fix for this bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69737</commentid>
    <comment_count>3</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-01-12 00:49:46 +0000</bug_when>
    <thetext>I attached the patch file that should fix this issue.

I will test it a bit more a then send each patch to the corresponding mailing list: cooker.py -&gt; bitbake, sanity.bbclass-&gt;oe-core</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70873</commentid>
    <comment_count>4</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-02-21 21:04:48 +0000</bug_when>
    <thetext>Patch merged with master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e98757e267389267d96778a1b443293eae12799e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71289</commentid>
    <comment_count>5</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2017-03-14 21:29:37 +0000</bug_when>
    <thetext>Verified on commit: 6e20b31d5d17133e0fca086e12a0ad06ab5c4cc8 is working correctly 

ERROR:  OE-core&apos;s config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    MACHINE=foo is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>3593</attachid>
            <date>2017-01-12 00:46:56 +0000</date>
            <delta_ts>2017-01-12 00:46:56 +0000</delta_ts>
            <desc>patch file to implement the fix for this bug</desc>
            <filename>10810.diff</filename>
            <type>text/plain</type>
            <size>1440</size>
            <attacher name="Juro Bystricky">juro.bystricky</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL2JpdGJha2UvbGliL2JiL2Nvb2tlci5weSBiL2JpdGJha2UvbGliL2JiL2Nv
b2tlci5weQppbmRleCAxODJkMDQ0Li5mNmJhZDM2IDEwMDY0NAotLS0gYS9iaXRiYWtlL2xpYi9i
Yi9jb29rZXIucHkKKysrIGIvYml0YmFrZS9saWIvYmIvY29va2VyLnB5CkBAIC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1
ZQogICAgIGlmIGQuZ2V0VmFyKCdNQUNISU5FJyk6CiAgICAgICAgIGlmIG5vdCBjaGVja19jb25m
X2V4aXN0cygiY29uZi9tYWNoaW5lLyR7TUFDSElORX0uY29uZiIsIGQpOgotICAgICAgICAgICAg
c3RhdHVzLmFkZHJlc3VsdCgnUGxlYXNlIHNldCBhIHZhbGlkIE1BQ0hJTkUgaW4geW91ciBsb2Nh
bC5jb25mIG9yIGVudmlyb25tZW50XG4nKQorICAgICAgICAgICAgc3RhdHVzLmFkZHJlc3VsdCgn
SW52YWxpZCBNQUNISU5FPSVzLiBQbGVhc2Ugc2V0IGEgdmFsaWQgTUFDSElORSBpbiB5b3VyIGxv
Y2FsLmNvbmYsIGNvbmYvbXVsdGljb25maWcvKi5jb25mIG9yIGVudmlyb25tZW50XG4nICUgKGQu
Z2V0VmFyKCdNQUNISU5FJykpKQogICAgICAgICAgICAgbWFjaGluZXZhbGlkID0gRmFsc2UKICAg
ICAgICAgZWxzZToKICAgICAgICAgICAgIHN0YXR1cy5hZGRyZXN1bHQoY2hlY2tfc2FuaXR5X3Zh
bGlkbWFjaGluZShkKSkK
</data>

          </attachment>
      

    </bug>

</bugzilla>