<?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>13707</bug_id>
          
          <creation_ts>2019-12-16 02:13:31 +0000</creation_ts>
          <short_desc>toaster: import build directory fails if BBLAYERS contains variable reference</short_desc>
          <delta_ts>2020-03-30 18:31:12 +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>Toaster</product>
          <component>toaster</component>
          <version>3.0</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>3.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>david.reyna</cc>
    
    <cc>randy.macleod</cc>
          
          <qa_contact name="Toaster default assignee">toaster</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</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>85833</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2019-12-16 02:13:31 +0000</bug_when>
    <thetext>Try to import a build directory whose bblayers.conf sets BBLAYERS to a value that includes a variable reference e.g.:

BBLAYERS = &quot;${TOPDIR}/../meta \
            ${TOPDIR}/../meta-selftest&quot;

The import code does not know how to handle this and throws a traceback as a literal &quot;${TOPDIR}/../meta&quot; path does not exist. Looking at buildimport.py, initially I thought the fix would be to properly parse the configuration files using bitbake&apos;s own code (e.g using tinfoil), but unfortunately that is not practical since we&apos;re not in the right context to invoke bitbake code, and even if we were the build directory may not actually be parseable by the version of bitbake that toaster is running with. (Perhaps this is something we can look at in future after some refactoring.)

The more practical alternative at the moment is to teach the conf reading code how to (a) deal with variable references and (b) specifically about TOPDIR which is typically set by bitbake itself. I have a patch that does this and it appears to work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85835</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2019-12-16 02:31:54 +0000</bug_when>
    <thetext>WIP fix here: http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=paule/toaster-bblayers-var-fix&amp;id=929dcef71003590e696d2dd46894b534c7a8f844</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86869</commentid>
    <comment_count>2</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2020-03-30 18:31:12 +0000</bug_when>
    <thetext>WIP patch: commit abee806f114fff3565d8796db0eab86f64bb937b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>