Bug 1803 - Add helper shell commands
Summary: Add helper shell commands
Status: RESOLVED WONTFIX
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-12-01 14:42 UTC by Joshua Lock - Disabled
Modified: 2018-01-18 16:19 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Lock - Disabled 2011-12-01 14:42:41 UTC
It'd be a great usability enhancement to implement a suite of shell commands to help CLI users interoperate with the system which are 'enabled' when the oe-init-build-env script is sourced. Some examples to get us started:

oecd PN - change into the directory containing metadata for the package PN.

oeed PN <FILE> - open the recipe file for PN with $EDITOR, if the optional FILE is passed open file FILE within the tree of PN.

oels PN <SUBDIR> - list the contents of the metadata directory for PN.

Example usage:

joshual@shamshir:~/Projects/Yocto/poky
$ oels connman
connman-0.75   connman-gnome_0.5.bb  connman_0.75.bb
connman-gnome  connman.inc

joshual@shamshir:~/Projects/Yocto/poky
$ oels connman connman-0.75
add_xuser_dbus_permission.patch  dbusperms.patch
connman                          xtables_version.patch


joshual@shamshir:~/Projects/Yocto/poky
$ oecd connman
$ ls
connman-0.75   connman-gnome_0.5.bb  connman_0.75.bb
connman-gnome  connman.inc           connman_git.bb

joshual@shamshir:~/Projects/Yocto/poky
$ oecd connman connman-gnome
$ ls
3g.patch  security-type.patch
$ pwd
/home/joshual/Projects/Yocto/poky/meta/recipes-connectivity/connman/connman-gnome


joshual@shamshir:~/Projects/Yocto/poky
$ oeed connman
There are two bb recipes in /home/joshual/Projects/Yocto/poky/meta/recipes-connectivity/connman, please select an option and press return to continue, return with no selection will pick the default (*):
1) connman_0.75.bb (*)
2) connman-gnome_0.5.bb
3) connman.inc
<<Return loads /home/joshual/Projects/Yocto/poky/meta/recipes-connectivity/connman/connman_0.75.bb with $EDITOR>>

joshual@shamshir:~/Projects/Yocto/poky
$ oeed connman xtables_version.patch
<<Loads /home/joshual/Projects/Yocto/poky/meta/recipes-connectivity/connman/connman-0.75/xtables_version.patch with $EDITOR>>

It will be necessary to have the commands be aware of bblayers.conf entries and the layers' priorities.
I envisage that under the hood these commands would just be running find over the enabled layers with some simple heuristics (search higher priority layers first, etc).
Comment 1 Martin Jansa 2014-05-03 17:38:26 UTC
We wanted to document our own developer workflows for different types of developers, that could be great source of commands which should be simplified by these helpers.
Comment 2 Richard Purdie 2014-09-24 13:50:10 UTC
Martin: I'd love to see any workflow documentation like that you might have...
Comment 3 Paul Eggleton 2015-10-21 14:41:55 UTC
devtool accomplishes at least part of where I think this was aimed, FWIW.
Comment 4 Joshua Lock 2018-01-18 16:19:09 UTC
devtool is able to accomplish the tricky parts of what this bug requests and is a more complete solution to simplifying working with OE metadata, in light of devtool these helpers don't make much sense.