<?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>10638</bug_id>
          
          <creation_ts>2016-11-09 20:13:58 +0000</creation_ts>
          <short_desc>RMC: Refactoring database generation in rmc.bbclass</short_desc>
          <delta_ts>2017-05-18 16:36:56 +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>BSPs</product>
          <component>bsps-meta-intel</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4</target_milestone>
          <dependson>11323</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jianxun Zhang">jianxun.zhang</reporter>
          <assigned_to name="Todor Minchev">todor.minchev</assigned_to>
          <cc>bluelightning</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>68204</commentid>
    <comment_count>0</comment_count>
    <who name="Jianxun Zhang">jianxun.zhang</who>
    <bug_when>2016-11-09 20:13:58 +0000</bug_when>
    <thetext>The current implementation in rmc.bbclass is a shell function. It packs fingerprint and data based on board directories fed into the interface variable by RMC users.

But it is possible that two board directories contain same fingerprint of a type of board but with same filenames for RMC data. This will cause two RMC records for a type of board packed in RMC database.

The RMC tool cannot make judgement. The current solution in rmc is to go through all records for the board and pick up the first matched file blob for the board at run time.

This brings ambiguity because the order of records is actually determined by how build system generates the database. It is not obvious which will be fetched between two file blob, with same file name, in two records at run time.

I suggest we change the logic in rmc.bbclass into a python function which can consolidate data in different board directories into a single record when they have same fingerprint. It can also show developer a warning message at build time to prompt the potential conflict between blobs. (e.g. when one BSP layer tries to override a file blob from lower layers.)

In a short, only one RMC record will be generated for a type of board.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73341</commentid>
    <comment_count>1</comment_count>
    <who name="Todor Minchev">todor.minchev</who>
    <bug_when>2017-05-18 16:36:56 +0000</bug_when>
    <thetext>Does not apply to RMC2.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>