RFC Several fixes around recipetool appendsrcfile(s) and oe.recipeutils.bbappend_recipe
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest0 of 7 patches 2 repliesIn review
Patches in v1 No applies recorded yet
None of the 7 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC] [PATCH 0/7] Several fixes around recipetool appendsrcfile(s) and oe.recipeutils.bbappend_recipe
Hi all,
I was trying to use recipetool appendsrcfile to add a file to a recipe and I noticed several issues:
* -m is not correctly supported
* recipetool appendsrfile(s) are missing a usefull dry-run mode
* appendsrc function relies on oe.recipeutils.bbappend_recipe but
duplicates some code: it constructs itself the new src_uri entry
although oe.recipeutils.bbappend_recipe is already doing it
* we are lacking a mode to patch the recipe itself
So this series tries to fix the issues above, fix the selftest accordingly and add new test for -m and for "patch mode" (update recipe) and also add a way to specify the name of the file to add (in oe.recipeutils.bbappend_recipe)
There is still one point I would like to discuss:
I skip test_recipetool_appendsrcfile_existing_in_src_uri_diff_params test because recipetool appendsrcfile(s) 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. So we need to figure out if we want to keep the old behaviour and if we need to patch oe.recipeutils.bbappend_recipe, and update the test or remove it.
I feel like if the parameters are different then we should add the new src_entry (so old behaviour was not correct) and remove old entry so either use "SRC_URI:remove" in bbapend file or completely remove the old entry in patch mode
What do you think?
Cheers
Julien
Julien Stephan (7):
recipetool: appendsrcfile(s): add dry-run mode
recipeutils: bbappend_recipe: fix undefined variable
recipetool: appendsrcfile(s): use params instead of extraline
recipeutils: bbappend_recipe: fix file not added to SRC_URI if name is
specified
recipeutils: bbappend_recipe: allow to patch the recipe itself
recipetool: appendsrcfile(s): add a mode to update the recipe itself oeqa/selftest/recipetool: appendsrfile: add test for machine
meta/lib/oe/recipeutils.py | 51 +++++++++++------- meta/lib/oeqa/selftest/cases/recipetool.py | 30 +++++++++-- scripts/lib/recipetool/append.py | 60 ++++++++++++++++------ 3 files changed, 103 insertions(+), 38 deletions(-)
Signature · 1 line
2.42.0