Bug 4856 - Improve usability of bitbake -c listtasks
Summary: Improve usability of bitbake -c listtasks
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.6
Hardware: All Multiple
: Medium enhancement
Target Milestone: 1.6
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard: 20 March 2014: Doc flag reset
Depends on:
Blocks:
 
Reported: 2013-07-16 14:56 UTC by mulhern
Modified: 2014-03-20 11:34 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mulhern 2013-07-16 14:56:37 UTC

    
Comment 1 mulhern 2013-07-16 15:34:09 UTC
bitbake is not so informative about commands that are available with --cmd flag.

One possibility would be that if you enter an unavailable task it will give you an error message and show you the list of available tasks whenever possible.

I'm not sure what the sentence "Depending on the base.bbclass a listtasks tasks is defined and will show available tasks" means but I think it is a little too specific about internals. I think it is intended to mean "The listtasks task will show the tasks available for the specified package." But it might mean the "The listtasks task may or may not be available...but if it is it will show you the other tasks available for the specified package." There is also a small typo, "tasks" should be "task".

Maybe if listtasks _is_ always available that could show up more obviously in the help text.

If it were possible to make listtasks a completely separate flag, not one of the cmd flags, that would also be more intuitive, I think.

If it were somehow possible to have a one sentence description of each task along with the help text that would also be great.

Also, if it were possible to order the tasks in some fashion, especially in some dependency order, that would be great.

I know this is nitpicky...but would have been most helpful when I first started out, and would probably be fairly helpful now.
Comment 2 Richard Purdie 2013-09-18 22:36:23 UTC
The --help text was atrocious, thanks for raising the issue. I've posted a patch onto the bitbake mailing list with some improvements.

For the second part of this, I think there may be a good case for a bitbake command which prints the target names and their SUMMARY field. I'm therefore going to adapt the bug as an enhancement for that. This would be a good command for our planned bitbake interaction work.
Comment 3 Paul Eggleton 2014-02-24 16:11:41 UTC
(Changing title to more closely reflect the original report.)

I've sent a patch to add the new task descriptions we added for Toaster to -c listtasks as well as sorting the list alphabetically. I did look at a dependency sort, but that's a topological sort, and given no such function is shipped as part of the python standard libraries it would seem excessive to pull one in just for this. In any case, I'm not sure that for the data we have this would lead to any particularly pleasing result - this is meant as a reference of the available tasks, not to show what order the tasks will execute, which is too complex for a sequential list anyway.
Comment 4 Paul Eggleton 2014-02-25 10:27:02 UTC
Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e4d1779c82a64bcaa1e5dca65c536a85dd684226

Unfortunately we can't really tweak the help text based on the metadata, because we want to show the help text before reading anything from the metadata; so I think we're stuck with the comment that refers to listtasks possibly being available.

Regarding Richard's comment about showing a list of recipes with SUMMARY, I think that's something that would fit better in the "bb" utility:

https://github.com/kergoth/bb

So I think we've addressed pretty much all of the comments. Please feel free to re-open or add another enhancement request if there's anything missing.
Comment 5 Scott Rifenbark 2014-03-20 11:34:40 UTC
Hi, 

This fix does not impact user documentation.  I am resetting the documentation flag to "Done".

Scott