<?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>9507</bug_id>
          
          <creation_ts>2016-04-22 09:45:41 +0000</creation_ts>
          <short_desc>Misleading error message when conf/bblayers has problems</short_desc>
          <delta_ts>2016-07-01 16:10:31 +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>normal</bug_severity>
          <target_milestone>2.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Geoffroy Van Cutsem">geoffroy.vancutsem</reporter>
          <assigned_to name="Geoffroy Van Cutsem">geoffroy.vancutsem</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>markus.lehtonen</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="Libertad">libertad.gonzalez.de.la.cruz</qa_contact>
          <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>61548</commentid>
    <comment_count>0</comment_count>
    <who name="Geoffroy Van Cutsem">geoffroy.vancutsem</who>
    <bug_when>2016-04-22 09:45:41 +0000</bug_when>
    <thetext>While doing some experiments, I accidently messed up my conf/bblayers.conf file. That resulted in the following error message which confused me somewhat:

~/ostro-os/build$ bitbake tcpdump
ERROR: Traceback (most recent call last):
  File &quot;/home/gvancuts/ostro-os/bitbake/lib/bb/cookerdata.py&quot;, line 179, in wrapped
    return func(fn, *args)
  File &quot;/home/gvancuts/ostro-os/bitbake/lib/bb/cookerdata.py&quot;, line 203, in parse_config_file
    return bb.parse.handle(fn, data, include)
  File &quot;/home/gvancuts/ostro-os/bitbake/lib/bb/parse/__init__.py&quot;, line 113, in handle
    return h[&apos;handle&apos;](fn, data, include)
  File &quot;/home/gvancuts/ostro-os/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 124, in handle
    abs_fn = resolve_file(fn, data)
  File &quot;/home/gvancuts/ostro-os/bitbake/lib/bb/parse/__init__.py&quot;, line 131, in resolve_file
    raise IOError(errno.ENOENT, &quot;file %s not found in %s&quot; % (fn, bbpath))
IOError: [Errno 2] file conf/bitbake.conf not found in /home/gvancuts/ostro-os/build

ERROR: Unable to parse conf/bitbake.conf: [Errno 2] file conf/bitbake.conf not found in /home/gvancuts/ostro-os/build

Could this be improved so that it does not refer to a conf/bitbake.conf file that does not exist?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61549</commentid>
    <comment_count>1</comment_count>
    <who name="Geoffroy Van Cutsem">geoffroy.vancutsem</who>
    <bug_when>2016-04-22 09:47:11 +0000</bug_when>
    <thetext>$ bitbake --version
BitBake Build Tool Core version 1.30.0

(not sure how to map that the values pre-set in the field above)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62283</commentid>
    <comment_count>2</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-05-18 10:37:51 +0000</bug_when>
    <thetext>How did you mess up your bblayers.conf? bblayers.conf is actually the first configuration file that gets read and bitbake.conf is searched from the path (or list of paths) defined in BBPATH variable. So, if you e.g. remove all layers from BBLAYERS it will search for &quot;conf/bitbake.conf&quot; in your build directory as bblayers.conf contains (by default)
BBPATH = &quot;${TOPDIR}&quot;

How would you expect bitbake to behave differently?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62380</commentid>
    <comment_count>3</comment_count>
    <who name="Geoffroy Van Cutsem">geoffroy.vancutsem</who>
    <bug_when>2016-05-23 13:57:47 +0000</bug_when>
    <thetext>I&apos;m not expecting bitbake to behave much differently than today but the error message could be improved. I have never had a conf/bitbake.conf file in my system so this puzzled me quite a bit until I realised it may have something to do with me tweaking (and messing up) my bblayers.conf. Couldn&apos;t bitbake catch that there is a problem with the bblayers.conf file it parsed and spit out an error message that the parsing failed (+ indicate exactly which file was not parsed correctly)?

I had manually commented out a line in my bblayers.conf as follows:
BBLAYERS ?= &quot; \
  ${OSTRO_LAYERS} \
#  /home/gvancuts/meta-intel-sofia \
  &quot;

As an example of what I&apos;d like to see, the error it generates for the following (still wrong, note the empty line) content is, for example, better:

BBLAYERS ?= &quot; \
  ${OSTRO_LAYERS} \

  &quot;

Here is the error message it gives in this case:
ERROR: ParseError at /home/gvancuts/ostro-os/build-ostro/conf/bblayers.conf:55: unparsed line: &apos;BBLAYERS ?= &quot; ${OSTRO_LAYERS} &apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62410</commentid>
    <comment_count>4</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-05-24 07:29:04 +0000</bug_when>
    <thetext>I&apos;m still not able to reproduce exactly the same error you got, with the same kind of typo that you got. If I erroneously try to &quot;comment out&quot; a line from BBLAYERS, I get an error like:
IOError: [Errno 2] file #/conf/layer.conf not found in /home/marquiz/yocto/openembedded-core/build

This is very misleading, too, and I just submitted a patch to fix that:
http://patchwork.openembedded.org/patch/123273/

Does this fix your problems or are there still some misleading errors you&apos;re seeing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62411</commentid>
    <comment_count>5</comment_count>
    <who name="Geoffroy Van Cutsem">geoffroy.vancutsem</who>
    <bug_when>2016-05-24 08:19:48 +0000</bug_when>
    <thetext>Hi Markus,

I&apos;m seeing the same errors as you do. I have tried to go back in history but I cannot, for the life of me, reproduce the exact same error message I was getting. It does not help that I did not write down exactly how I had messed up my bblayers.conf file originally... your patch looks good and certainly generates a much more relevant error message. Let&apos;s close this bug based on that. If I ever run across the original error message again, I&apos;ll file a new ticket.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62420</commentid>
    <comment_count>6</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-05-24 11:42:31 +0000</bug_when>
    <thetext>OK, thanks Geoffroy. I&apos;ll close this one when my patch gets merged. You may then re-open if you see more issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63182</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-06-21 11:12:18 +0000</bug_when>
    <thetext>Fixed in bitbake 32c9689e4b492dc5821749e284e397d717af2a6c.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>