]> code.ossystems Code Review - openembedded-core.git/commit
devtool-source.bbclass: Only create each patch branch once
authorOlof Johansson <olof.johansson@axis.com>
Fri, 19 Oct 2018 16:15:23 +0000 (18:15 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 20 Oct 2018 21:39:25 +0000 (22:39 +0100)
commit95a921959d340f74b5604df57737c1eeaad0023e
tree9bcf8d9f32038f3acba23be9b01637c8e7a72755
parente1c6442872c9361b6b61a83adcce9cade2f2ecd2
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@axis.com>
Reviewed-by: Peter Kjellerstedt <pkj@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/devtool-source.bbclass