<?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>5476</bug_id>
          
          <creation_ts>2013-11-05 15:14:38 +0000</creation_ts>
          <short_desc>[yocto-bsp] find_bblayers fails with Python error if bitbake_env_cmd fails</short_desc>
          <delta_ts>2013-12-18 16:47:32 +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>Meta-yocto</product>
          <component>configuration</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>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bastien JAUNY">bastien.jauny</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <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>38544</commentid>
    <comment_count>0</comment_count>
    <who name="Bastien JAUNY">bastien.jauny</who>
    <bug_when>2013-11-05 15:14:38 +0000</bug_when>
    <thetext>In scripts/lib/bsp/kernel.py, find_bblayers() fails in case bitbake_env_cmd doesn&apos;t output BBLAYERS. This is due to a bad Python formatted string on line 66.

To reproduce:
1)In your build directory, set up an unexisting layer in conf/bblayers.conf (that will make &apos;bitbake -e&apos; fail)
2)Call yocto-bsp create with any target arch.

Actual results:
The script fails with a TypeError.

Expected results:
The script fails with an error message describing the cause.

Here&apos;s a proposed patch:

--- /home/bjauny/yocto/poky-dora/scripts/lib/bsp/kernel.py	2013-11-05 16:13:38.250129173 +0100
+++ /home/bjauny/yocto/poky-dora/scripts/lib/bsp/kernel.py.new	2013-11-05 16:13:17.042128497 +0100
@@ -62,7 +62,7 @@
             break
 
     if not bblayers:
-        print &quot;Couldn&apos;t find BBLAYERS in &apos;bitbake -e&apos; output, exiting.&quot; % \
+        print &quot;Couldn&apos;t find BBLAYERS in %s output, exiting.&quot; % \
             bitbake_env_cmd
         sys.exit(1)
 

Seen on dora head revision.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38545</commentid>
    <comment_count>1</comment_count>
      <attachid>1608</attachid>
    <who name="Bastien JAUNY">bastien.jauny</who>
    <bug_when>2013-11-05 15:16:53 +0000</bug_when>
    <thetext>Created attachment 1608
Proposed patch

Attached proposed patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38737</commentid>
    <comment_count>2</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-11-13 14:34:43 +0000</bug_when>
    <thetext>Hi, I&apos;ve verified the problem and the patch looks good - feel free to submit it to the poky mailing list, or if you&apos;d rather, I can do that (and give you credit).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38740</commentid>
    <comment_count>3</comment_count>
    <who name="Bastien JAUNY">bastien.jauny</who>
    <bug_when>2013-11-13 15:08:05 +0000</bug_when>
    <thetext>Hi Tom,
I&apos;m not used to the mailing list process. Should I just post a new thread describing this bug or do I also need to commit my patch? Sorry if these are noob questions but I&apos;m brand new to this, even if I used yocto intensively the last months.

(In reply to comment #2)
&gt; Hi, I&apos;ve verified the problem and the patch looks good - feel free to submit
&gt; it to the poky mailing list, or if you&apos;d rather, I can do that (and give you
&gt; credit).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38741</commentid>
    <comment_count>4</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-11-13 15:31:23 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Hi Tom,
&gt; I&apos;m not used to the mailing list process. Should I just post a new thread
&gt; describing this bug or do I also need to commit my patch? Sorry if these are
&gt; noob questions but I&apos;m brand new to this, even if I used yocto intensively
&gt; the last months.
&gt; 
&gt; (In reply to comment #2)
&gt; &gt; Hi, I&apos;ve verified the problem and the patch looks good - feel free to submit
&gt; &gt; it to the poky mailing list, or if you&apos;d rather, I can do that (and give you
&gt; &gt; credit).

You can just submit the patch to the poky mailing list - the patch itself should describe teh problem and what you did to fix it.  Here are some basic instructions on how you can do that - let me know if you need help with any of it.

https://wiki.yoctoproject.org/wiki/Poky_Contributions

If you don&apos;t want to go to the trouble of getting poky-contrib access, since this is such a simple patch, you could just send the patch in e-mail only e.g. make your change in git, &apos;tit commit -s&apos; the change, then do &apos;git format-patch -1&apos; and send that patch to the list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38750</commentid>
    <comment_count>5</comment_count>
    <who name="Bastien JAUNY">bastien.jauny</who>
    <bug_when>2013-11-13 18:07:36 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; Hi Tom,
&gt; &gt; I&apos;m not used to the mailing list process. Should I just post a new thread
&gt; &gt; describing this bug or do I also need to commit my patch? Sorry if these are
&gt; &gt; noob questions but I&apos;m brand new to this, even if I used yocto intensively
&gt; &gt; the last months.
&gt; &gt; 
&gt; &gt; (In reply to comment #2)
&gt; &gt; &gt; Hi, I&apos;ve verified the problem and the patch looks good - feel free to submit
&gt; &gt; &gt; it to the poky mailing list, or if you&apos;d rather, I can do that (and give you
&gt; &gt; &gt; credit).
&gt; 
&gt; You can just submit the patch to the poky mailing list - the patch itself
&gt; should describe teh problem and what you did to fix it.  Here are some basic
&gt; instructions on how you can do that - let me know if you need help with any
&gt; of it.
&gt; 
&gt; https://wiki.yoctoproject.org/wiki/Poky_Contributions
&gt; 
&gt; If you don&apos;t want to go to the trouble of getting poky-contrib access, since
&gt; this is such a simple patch, you could just send the patch in e-mail only
&gt; e.g. make your change in git, &apos;tit commit -s&apos; the change, then do &apos;git
&gt; format-patch -1&apos; and send that patch to the list.

Just did your latest suggestion. Screwed up a little bit my mail, but I&apos;ll correct that. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39478</commentid>
    <comment_count>6</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-12-18 16:47:32 +0000</bug_when>
    <thetext>Fixed by poky/master commit: d60b4ff3517487bd111c6d7e1410882280229377</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1608</attachid>
            <date>2013-11-05 15:16:53 +0000</date>
            <delta_ts>2013-11-05 15:16:53 +0000</delta_ts>
            <desc>Proposed patch</desc>
            <filename>kernel.py.patch</filename>
            <type>text/plain</type>
            <size>451</size>
            <attacher name="Bastien JAUNY">bastien.jauny</attacher>
            
              <data encoding="base64">LS0tIC9ob21lL2JqYXVueS95b2N0by9wb2t5LWRvcmEvc2NyaXB0cy9saWIvYnNwL2tlcm5lbC5w
eQkyMDEzLTExLTA1IDE2OjEzOjM4LjI1MDEyOTE3MyArMDEwMAorKysgL2hvbWUvYmphdW55L3lv
Y3RvL3Bva3ktZG9yYS9zY3JpcHRzL2xpYi9ic3Ava2VybmVsLnB5Lm5ldwkyMDEzLTExLTA1IDE2
OjEzOjE3LjA0MjEyODQ5NyArMDEwMApAQCAtNjIsNyArNjIsNyBAQAogICAgICAgICAgICAgYnJl
YWsKIAogICAgIGlmIG5vdCBiYmxheWVyczoKLSAgICAgICAgcHJpbnQgIkNvdWxkbid0IGZpbmQg
QkJMQVlFUlMgaW4gJ2JpdGJha2UgLWUnIG91dHB1dCwgZXhpdGluZy4iICUgXAorICAgICAgICBw
cmludCAiQ291bGRuJ3QgZmluZCBCQkxBWUVSUyBpbiAlcyBvdXRwdXQsIGV4aXRpbmcuIiAlIFwK
ICAgICAgICAgICAgIGJpdGJha2VfZW52X2NtZAogICAgICAgICBzeXMuZXhpdCgxKQogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>