[OE-core] [RFC PATCH 0/7] Developer workflow improvements

Paul Barker paul at paulbarker.me.uk
Tue Nov 25 17:51:05 UTC 2014


On 25 November 2014 at 17:28, Paul Eggleton
<paul.eggleton at linux.intel.com> wrote:
> [Note: this is an RFC series for the moment, and shouldn't yet be merged.]
>
> I've been looking at how to make it easier for application and system
> component developers to get their work done using the tools we provide,
> and I believe this patchset is a piece of the solution. There's still a
> number of other pieces to come, but this should be usable on its own.
>
> The first three patches extend the PATCHTOOL = "git" code to ensure that
> we're able to apply all patches even if "git am" and "git apply" can't
> handle them, and that we do a commit to the repository per patch. This
> is needed for devtool later on.
>
> I've then added a new recipe auto-creation script, recipetool, which can
> take a source tree or URL and create a skeleton recipe to build it.
> (In case anyone is wondering about the existing scripts/create-recipe,
> frankly I consider it a dead end - it's written in Perl, which makes it
> a bit difficult to integrate with the rest of our code; it's also
> GPLv3-only which makes any such integration pretty much impossible from
> another angle.)
>
> Then we add devtool. This allows you to:
>
>  * Add a new piece of software (auto-create the skeleton of a recipe
>    using the aforementioned recipetool and point the build to an external
>    source tree)
>  * Modify the source for an existing recipe (point the build to an
>    external source tree, possibly creating that tree in the same step
>    and managing it with git)
>  * Deploy the installed files from a recipe from ${D} to a target using
>    scp.
>
> There will obviously be extensions to these tools, but I hope they are
> already functional enough to be useful at the state they are in at the
> moment.
>
> Known issues:
>
>  * "devtool modify" can't currently deal with gcc, linux-yocto or perf
>    because they manage their workdir differently, this will need to be
>    fixed
>  * devtool's workspace layer triggers a bitbake warning when empty.
>    I suspect a mechanism to disable this warning internally will need to
>    be added.
>  * "recipetool create" ideally needs to become smarter and fill in
>    more details of the recipe. At some point we'll probably have to
>    make the process interactive and possibly have it automate parts of
>    the build process and examine the output; some things just can't be
>    practically detected from the source tree without building.
>
>
> (Note that some pieces of the code which are not essential rely on a couple
> of changes to bitbake, you can find these in the paule/devtool-bb branch
> in poky-contrib, or if you are happy to use poky, grab the paule/devtool
> branch in poky-contrib which has everything).
>
> Comments/questions/suggestions welcome!
>

This sounds great and looks like it will make some regular tasks quite
a bit easier!

One thing which may be useful within recipetool or devtool is a single
command to create patch files (using `git format-patch`), put them
into the relevant directory and add the file names to SRC_URI.
Obviously this assumes the external source tree is a git repo and we
can trace the local modifications back to either an external master
branch or an initial state after extracting a source archive. I'm just
thinking out loud here though, depends if other people think that work
flow is common enough to be worth creating a shortcut for.

Thanks,

-- 
Paul Barker

Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk



More information about the Openembedded-core mailing list