When I'd done a bad job of merging some changes across branches I had some code calling a command that didn't exist. BitBake should probably complain loudly, when this happens.
It turns out that this isn't entirely 'silent'. The runCommand method of the command module returns a "No such command" 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'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't "No such command" or "Busy "...
As this is a P3 issue I'm pushing it out to M4
RP thought he can get it fixed earlier and would like to assign to him
Looking at the code, you should be checking the return value of runCommand with something like: err = runCommand(x) if err != True: bb.fatal("runCommand failed!") Since Joshua isn't working on hob now and I'm not familar with the v2 codebase I'm reassigning to Shane. Shane: Can you find someone working on hobv2 to ensure the new code has error handling checks in place?
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
Please audit the command that HOB is using
Should I throw a Hob exception in hobeventhandler.py if runCommand returns "Busy..." or "No such command"? Is this the desired behavior? I didn't discovered any errors using this validation. This needs to be tested more because it might uncover bugs.
Bug fixed.
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!
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: "$command_line has failed with output $output. We recommend that you restart Hob". 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't remember which one :( Thanks! Belen
Reopening to find out if the agreed changed have been implemented.
(In reply to comment #11) > Reopening to find out if the agreed changed have been implemented. The changes have been implemented in 8d019a77d7c6ded1cff66094bfb9effa38c75c98. Constantin
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't remember which file, which line or which command :(
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(["findConfigFilePath", "bblayers.conf"]) to self.runCommand(["findConfigFilePathx", "bblayers.conf"]) 4. Run Hob