Commit Graph

166 Commits

Author SHA1 Message Date
Markus Lehtonen ee0ff82b56 devtool: modify: use B=S if that is the default for the recipe
Makes the build succeed for packages which do not support separate build
directory, e.g. zlib. The same outcome could be achieved with the
--same-dir option, but, it's generally hard to tell if a random package
would need that option. The negative side effect of this patch is that
dev srctree (of some packages that build fine without this modification)
gets dirtied by build artefacts.

(From OE-Core rev: 6ac5692426956e276ba2119f917b0f30791e6cd6)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27 15:05:51 +01:00
Markus Lehtonen d7a9b5ea55 devtool: call parse_recipe with correct arguments
Give the correct data object ("config data" instead of "recipe data") as
an argument to oe.recipeutils.patch_recipe()

Fixes [YOCTO #7595]

(From OE-Core rev: 7d2b918019b0afe215a6489dad697afac34f73e9)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-19 13:34:43 +01:00
Paul Eggleton cb4b07838c devtool: modify/extract: prevent usage with incompatible recipes
Consolidate code for checking compatible recipes and consider meta and
packagegroup recipes as well as package-index and gcc-source to be
incompatible.

(From OE-Core rev: 4be9bf637583b341a89af1b9924752abc7d49c94)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20 11:27:45 +00:00
Paul Eggleton 221705f014 devtool: modify: get correct initial revision from previously extracted source tree
If you point devtool modify to a source tree previously created by
devtool modify or devtool extract, then we need to try to pick up the
correct initial revision so that devtool update-recipe knows where to
start looking for commits that match up with patches in the recipe.

(From OE-Core rev: c20e10543e268ebb43074a3f8d6e7ed991e54ec8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20 11:27:44 +00:00
Paul Eggleton 9adae67e71 devtool: reset: add ability to reset entire workspace
Add a -a/--all option to allow you to quickly reset all recipes in your
workspace.

(From OE-Core rev: 0c83788b111a761f6f500b86780cc51aed255402)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20 11:27:44 +00:00
Paul Eggleton e3cfb80f1e devtool: name command line parsers appropriately
No functional changes, just use a unique name for each parser.

(From OE-Core rev: 5fabc59d6221c3fe7137b70e31ec2761a4276a6c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20 11:27:43 +00:00
Paul Eggleton 122ee11bd1 devtool: fix broken clones of git recipes
Because we move the workdir when extracting source, then move the source
and delete the temporary workdir, you lose the indirection symlink
pointed to by the alternates file (which is created when the fetcher
clones it from DL_DIR with -s) and the resulting repository is broken.
In any case, for a source repo that the user may put their own changes
into, we can't really rely on a clone made with -s in case the
original goes away - because of cleanall, DL_DIR disappearing, etc. So
repack the repository so that it is a complete, non-shared clone after
unpacking.

(While I'm at it, add a test for devtool modify with a git recipe which
verifies that this works.)

(From OE-Core rev: dccdde4321c48a571677995a4e1dfc583e899cbe)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:29 +00:00
Paul Eggleton e7744de454 devtool: support source extraction for recipes that use a shared workdir
Enable source extraction used by devtool extract / devtool modify -x for
recipes that use a shared workdir (e.g. the kernel and gcc).

(From OE-Core rev: 73a5bdc7921791b954ca717293e76c7e3091a19e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:29 +00:00
Paul Eggleton 62a41b412f devtool: modify: handle recipes that use a shared workdir
If S is outside of WORKDIR then we shouldn't try to get the relative
path in order to work out where the source subdirectory is as we do by
default.

(From OE-Core rev: 7392ecd559ef71241405c704a65da171ee216ca1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:29 +00:00
Paul Eggleton e2ce29fef2 devtool: prevent extract/modify use with image recipes
There wouldn't be any point to using these with an image recipe, so
disallow it.

(From OE-Core rev: 611c27182a6e52e159a1ce1b5bac054405c611d2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:29 +00:00
Paul Eggleton efedd4323b devtool: update-recipe: add handling for git recipes
When updating git-based recipes, in a lot of cases what you want is to
push the changes to the repository and update SRCREV rather than to
apply patches within the recipe. Updating SRCREV is now the default
behaviour for recipes that fetch from git, but this can be overridden
in both directions using a new -m/--mode option.

(From OE-Core rev: 654792bb87610ee3569d02a85fa9ec071bf8ab6d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:29 +00:00
Paul Eggleton e5bf4ed333 devtool: build: run do_populate_sysroot instead of do_install
If you want to be able to make use of libraries in conjunction with
devtool then we need to install them into the sysroot for other recipes
to use. Make it a configuration option in case it needs to be changed at
runtime.

(From OE-Core rev: 94f517ad8e55edfbe6f06afd963bcfeb849626ff)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:28 +00:00
Paul Eggleton 845efa450c devtool: reset: run bitbake -c clean on recipe
If you've added a new recipe, you want the output cleaned when you do
devtool reset, otherwise cruft from building the recipe may remain which
could interfere with future builds.

(From OE-Core rev: 664d1a7fe8f8288fabc582d00f6e36ab29496ec5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:28 +00:00
Paul Eggleton 8e7437b3f0 devtool: add/modify: add option to build in same directory
The default behaviour is to build in a separate directory to the source,
however some projects can't be built this way, so add an option to do
that (or override the automatic behaviour in the case of modify).

(From OE-Core rev: cf094ed2f616a581eb07d78db4366c83a441fde5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23 17:35:28 +00:00
Paul Eggleton 943353707b devtool: improve command-line help
Based on feedback from Scott Rifenbark <scott.m.rifenbark@intel.com>

(From OE-Core rev: ec3378f3a7013e289daa0f5c52329488b861f99c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:27 +00:00
Paul Eggleton cd5ca4a11d scripts/devtool: add development helper tool
Provides an easy means to work on developing applications and system
components with the build system.

For example to "modify" the source for an existing recipe:

  $ devtool modify -x pango /home/projects/pango
  Parsing recipes..done.
  NOTE: Fetching pango...
  NOTE: Unpacking...
  NOTE: Patching...
  NOTE: Source tree extracted to /home/projects/pango
  NOTE: Recipe pango now set up to build from /home/paul/projects/pango

The pango source is now extracted to /home/paul/projects/pango, managed
in git, with each patch as a commit, and a bbappend is created in the
workspace layer to use the source in /home/paul/projects/pango when
building.

Additionally, you can add a new piece of software:

  $ devtool add pv /home/projects/pv
  NOTE: Recipe /path/to/workspace/recipes/pv/pv.bb has been
  automatically created; further editing may be required to make it
  fully functional

The latter uses recipetool to create a skeleton recipe and again sets up
a bbappend to use the source in /home/projects/pv when building.

Having done a "devtool modify", can also write any changes to the
external git repository back as patches next to the recipe:

  $ devtool update-recipe mdadm
  Parsing recipes..done.
  NOTE: Removing patch mdadm-3.2.2_fix_for_x32.patch
  NOTE: Removing patch gcc-4.9.patch
  NOTE: Updating recipe mdadm_3.3.1.bb

[YOCTO #6561]
[YOCTO #6653]
[YOCTO #6656]

(From OE-Core rev: 716d9b1f304a12bab61b15e3ce526977c055f074)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:16 +00:00