[oe-commits] [openembedded-core] 04/11: devtool-source.bbclass: Only create each patch branch once
git at git.openembedded.org
git at git.openembedded.org
Wed Oct 10 22:31:27 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 1449f651f7708bc19a7118db9e0f43e8410b6888
Author: Olof Johansson <olof.johansson at axis.com>
AuthorDate: Wed Oct 10 17:35:28 2018 +0200
devtool-source.bbclass: Only create each patch branch once
For conditonally applied patches based on SRC_URI overrides, the
devtool-source class would try to create a new branch for each override
assignment as a postfunc to do_patch, but if the same override was used
multiple times, it would try to create the same branch multiple times,
causing errors like
> Exception: bb.process.ExecutionError: Execution of
\ 'git checkout f0f0f0f0f0ff0f0f0f0f0f0f0f0f0f0f0ff0f0f0 -b devtool-override-foo'
\ failed with exit code 128:
> fatal: A branch named 'devtool-override-foo' already exists.
This change makes sure that the devtool-source bbclass will only create
one branch per override.
Signed-off-by: Olof Johansson <olofjn at axis.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/devtool-source.bbclass | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/meta/classes/devtool-source.bbclass b/meta/classes/devtool-source.bbclass
index 67cd0ba..333ff84 100644
--- a/meta/classes/devtool-source.bbclass
+++ b/meta/classes/devtool-source.bbclass
@@ -181,16 +181,15 @@ python devtool_post_patch() {
except bb.process.ExecutionError:
pass
- extra_overrides = d.getVar('DEVTOOL_EXTRA_OVERRIDES')
- if extra_overrides:
- extra_override_list = extra_overrides.split(':')
+ devtool_overrides = set(d.getVar('DEVTOOL_EXTRA_OVERRIDES').split(':') or [])
+ if devtool_overrides:
devbranch = d.getVar('DEVTOOL_DEVBRANCH')
default_overrides = d.getVar('OVERRIDES').split(':')
no_overrides = []
# First, we may have some overrides that are referred to in the recipe set in
# our configuration, so we need to make a branch that excludes those
for override in default_overrides:
- if override not in extra_override_list:
+ if override not in devtool_overrides:
no_overrides.append(override)
if default_overrides != no_overrides:
# Some overrides are active in the current configuration, so
@@ -208,7 +207,7 @@ python devtool_post_patch() {
else:
bb.process.run('git checkout %s -b devtool-no-overrides' % devbranch, cwd=srcsubdir)
- for override in extra_override_list:
+ for override in devtool_overrides:
localdata = bb.data.createCopy(d)
if override in default_overrides:
bb.process.run('git branch devtool-override-%s %s' % (override, devbranch), cwd=srcsubdir)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list