<?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>1245</bug_id>
          
          <creation_ts>2011-07-15 10:50:43 +0000</creation_ts>
          <short_desc>BitBake proceeds unhindered when unrecognised commands are called</short_desc>
          <delta_ts>2012-10-31 16:46:17 +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>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>8202e49c5fa03822adf3a4d75bc87d33b23a7f65;8d019a77d7c6ded1cff66094bfb9effa38c75c98</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock - Disabled">josh</reporter>
          <assigned_to name="Constantin Musca">constantinx.musca</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>14740</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2011-07-15 10:50:43 +0000</bug_when>
    <thetext>When I&apos;d done a bad job of merging some changes across branches I had some code calling a command that didn&apos;t exist. BitBake should probably complain loudly, when this happens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14803</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2011-07-19 15:20:27 +0000</bug_when>
    <thetext>It turns out that this isn&apos;t entirely &apos;silent&apos;. The runCommand method of the command module returns a &quot;No such command&quot; string if the command is not recognised, or True if the command is run.

Not sure if the best approach is to change the runCommand method to return False if the command isn&apos;t run/available and wrap all calls to runCommand.
Perhaps easiest will be to create a runCommand wrapper for hob which checks to ensure the return value isn&apos;t &quot;No such command&quot; or &quot;Busy &quot;...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17624</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2011-12-13 14:27:53 +0000</bug_when>
    <thetext>As this is a P3 issue I&apos;m pushing it out to M4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17759</commentid>
    <comment_count>3</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2011-12-20 11:35:12 +0000</bug_when>
    <thetext>RP thought he can get it fixed earlier and would like to assign to him</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18375</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-01-26 12:26:22 +0000</bug_when>
    <thetext>Looking at the code, you should be checking the return value of runCommand with something like:

err = runCommand(x)
if err != True:
    bb.fatal(&quot;runCommand failed!&quot;)

Since Joshua isn&apos;t working on hob now and I&apos;m not familar with the v2 codebase  I&apos;m reassigning to Shane. 

Shane: Can you find someone working on hobv2 to ensure the new code has error handling checks in place?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21668</commentid>
    <comment_count>5</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2012-05-28 11:07:19 +0000</bug_when>
    <thetext>Will this display an error in Hob? If yes, how can users recover from this error: eg. ignore the bad command and continue, stop the build, restart Hob, etc? 

Belen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24106</commentid>
    <comment_count>6</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2012-08-16 14:46:28 +0000</bug_when>
    <thetext>Please audit the command that HOB is using</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25988</commentid>
    <comment_count>7</comment_count>
    <who name="Constantin Musca">constantinx.musca</who>
    <bug_when>2012-10-01 12:52:24 +0000</bug_when>
    <thetext>Should I throw a Hob exception in hobeventhandler.py if runCommand returns &quot;Busy...&quot; or &quot;No such command&quot;? Is this the desired behavior? I didn&apos;t discovered any errors using this validation. This needs to be tested more because it might uncover bugs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26223</commentid>
    <comment_count>8</comment_count>
    <who name="Constantin Musca">constantinx.musca</who>
    <bug_when>2012-10-04 13:33:32 +0000</bug_when>
    <thetext>Bug fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26244</commentid>
    <comment_count>9</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2012-10-04 15:22:15 +0000</bug_when>
    <thetext>Hi Constantin,

This bug was filed by Joshua, who is no longer working with us. I can test the fix, but I would need a test case. Do you have one I could use?

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27109</commentid>
    <comment_count>10</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2012-10-31 14:18:04 +0000</bug_when>
    <thetext>Hi Constantin,

Last time we spoke we agreed on some changes to the message Hob gives you when an unrecognised command is called. I believe the final text was: &quot;$command_line has failed with output $output. We recommend that you restart Hob&quot;.

Any luck with implementing the changes? 

Also, if you could tell me again the test case, that would be really helpful. I remember I slightly modified one Hob file, but can&apos;t remember which one :(

Thanks!

Belen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27110</commentid>
    <comment_count>11</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2012-10-31 14:18:50 +0000</bug_when>
    <thetext>Reopening to find out if the agreed changed have been implemented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27113</commentid>
    <comment_count>12</comment_count>
    <who name="Constantin Musca">constantinx.musca</who>
    <bug_when>2012-10-31 14:41:15 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; Reopening to find out if the agreed changed have been implemented.

The changes have been implemented in 8d019a77d7c6ded1cff66094bfb9effa38c75c98.

Constantin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27118</commentid>
    <comment_count>13</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2012-10-31 14:49:29 +0000</bug_when>
    <thetext>Thanks! Any chance you could remind me of the test case? We changed one letter of a command in a Hob file, but I can&apos;t remember which file, which line or which command :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27124</commentid>
    <comment_count>14</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2012-10-31 16:46:17 +0000</bug_when>
    <thetext>verified on e9e3285e1397cfd2d34f4eb7b5aa59311eea861d

To test this bug, you can do the following:

1. Open the following file in a text editor: 
./bitbake/lib/bb/ui/crumbs/hobeventhandler.py

2. Go to line 139

3. Change self.runCommand([&quot;findConfigFilePath&quot;, &quot;bblayers.conf&quot;]) to self.runCommand([&quot;findConfigFilePathx&quot;, &quot;bblayers.conf&quot;])

4. Run Hob</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>