]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
recipetool: appendsrcfile(s): use params instead of extraline
authorJulien Stephan <jstephan@baylibre.com>
Tue, 5 Dec 2023 14:56:32 +0000 (15:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Dec 2023 22:55:46 +0000 (22:55 +0000)
commitcd5de8d53849a6f3bb6f82e45fb301e39892c789
tree1c740f30baa78a4610b0f14650fbb55d68ee603d
parenta4628fffcfecb5cd95dc2558dfd39ebd71121eab
recipetool: appendsrcfile(s): use params instead of extraline

appendsrc function relies on oe.recipeutils.bbappend_recipe to
copy files and add the corresponding entries in SRC_URI.

Currently, appendsrc function build itself the new SRC_URI entry to add the
correct subdir param, and gives it using the extralines parameter.
This has 2 drawbacks:
- oe.recipeutils.bbappend_recipe can already do this if we specify the
  correct params, so we have duplicate code
- the duplicated code is not fully functional: for example, it doesn't
  take into account the -m/--machine parameter

So fix this by not using extralines but give correctly formatted params.

Also remove the check for already existing entries as
oe.recipeutils.bbappend_recipe already implement it

The new bbappend file now have the SRC_URI entry after the
FILESEXTRAPATHS so fix the selftest.

Update test_recipetool_appendsrcfile_existing_in_src_uri_diff_params
test because recipetool appendsrcfiles used to not add new src_uri entry
if the entry already exist even with different parameters while
oe.recipeutils.bbappend_recipe adds it if parameters are different (and
remove the old entry)

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/recipetool.py
scripts/lib/recipetool/append.py