summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
diff options
context:
space:
mode:
authorJulien Stephan <jstephan@baylibre.com>2023-12-05 15:56:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-06 22:55:49 +0000
commit11d4d437d52af4e2abd103ba372e00d69186c516 (patch)
treee58f1650e531591a4b9e3dda69dc4ebe2c15b27c /meta/lib/oe/recipeutils.py
parentb45cab4e1c161b1b1c7e5960f00566fa489c17e2 (diff)
downloadpoky-11d4d437d52af4e2abd103ba372e00d69186c516.tar.gz
recipeutils: bbappend_recipe: add a way to specify the name of the file to add
bbappend_recipe can take a dict of source files to add to SRC_URI where the key is the full path to the file to be added and the value is a dict Add a new optionnal entry "newname" to specify the name of the newly added file (From OE-Core rev: e7bc09e5c9d7a0f4f8f4eba40730b68857b00677) 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>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r--meta/lib/oe/recipeutils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 01c9ad190f..1d793693bf 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -677,6 +677,8 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
677 path: the original filename as it would appear in SRC_URI 677 path: the original filename as it would appear in SRC_URI
678 or None if it isn't already present. 678 or None if it isn't already present.
679 patchdir: the patchdir parameter 679 patchdir: the patchdir parameter
680 newname: the name to give to the new added file. None to use
681 the default value: basename(path)
680 You may pass None for this parameter if you simply want to specify 682 You may pass None for this parameter if you simply want to specify
681 your own content via the extralines parameter. 683 your own content via the extralines parameter.
682 install: dict mapping entries in srcfiles to a tuple of two elements: 684 install: dict mapping entries in srcfiles to a tuple of two elements:
@@ -769,7 +771,10 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
769 for i, (newfile, param) in enumerate(srcfiles.items()): 771 for i, (newfile, param) in enumerate(srcfiles.items()):
770 srcurientry = None 772 srcurientry = None
771 if not 'path' in param or not param['path']: 773 if not 'path' in param or not param['path']:
772 srcfile = os.path.basename(newfile) 774 if 'newname' in param and param['newname']:
775 srcfile = param['newname']
776 else:
777 srcfile = os.path.basename(newfile)
773 srcurientry = 'file://%s' % srcfile 778 srcurientry = 'file://%s' % srcfile
774 if params and params[i]: 779 if params and params[i]:
775 srcurientry = '%s;%s' % (srcurientry, ';'.join('%s=%s' % (k,v) for k,v in params[i].items())) 780 srcurientry = '%s;%s' % (srcurientry, ';'.join('%s=%s' % (k,v) for k,v in params[i].items()))