]> code.ossystems Code Review - openembedded-core.git/commit
devtool: implement conditional patch handling
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 31 Oct 2017 03:48:05 +0000 (16:48 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 10 Nov 2017 14:44:31 +0000 (14:44 +0000)
commitaa87603d1ffd695027847f4df75c0406cf4e14d8
tree109f789016c878bf1955859c75ddf22fd2a40d7d
parent05f2d5d2ce00c53825ccea5cd9c2262f9d27a638
devtool: implement conditional patch handling

If you have a recipe that uses overrides to conditionally extend
SRC_URI to add additional patches, then you will often need to update
those patches if you're making other changes to the source tree (for
example if you're upgrading the underlying source). Make this possible
with devtool by creating devtool-override-* branches for each override
that conditionally appends/prepends SRC_URI, and have devtool
update-recipe / finish check each branch out in turn and update the
corresponding patches.

A current example of a recipe that does this is the quota recipe - it
applies an additional patch if musl is the selected C library (i.e.
libc-musl is in OVERRIDES).

Note that use of this functionality does require some care - in
particular, updates to patches that appear on the main branch (named
"devtool" by default) should be made there and not only on one of the
specific devtool-override-* branches that are created for each override.
The recommended procedure is to make the changes you want to make to the
main branch first, then check out and rebase each devtool-override-*
branch, testing each one by activating the corresponding configuration,
and then finally run devtool finish.

Fixes [YOCTO #11516].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/devtool-source.bbclass
scripts/lib/devtool/standard.py
scripts/lib/devtool/upgrade.py