diff options
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 695e981623..25b159bc1b 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -672,11 +672,11 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
672 | destlayerdir: base directory of the layer to place the bbappend in | 672 | destlayerdir: base directory of the layer to place the bbappend in |
673 | (subdirectory path from there will be determined automatically) | 673 | (subdirectory path from there will be determined automatically) |
674 | srcfiles: dict of source files to add to SRC_URI, where the value | 674 | srcfiles: dict of source files to add to SRC_URI, where the value |
675 | is the full path to the file to be added, and the value is the | 675 | is the full path to the file to be added, and the value is a |
676 | original filename as it would appear in SRC_URI or None if it | 676 | dict with 'path' key containing the original filename as it |
677 | isn't already present. You may pass None for this parameter if | 677 | would appear in SRC_URI or None if it isn't already present. |
678 | you simply want to specify your own content via the extralines | 678 | You may pass None for this parameter if you simply want to specify |
679 | parameter. | 679 | your own content via the extralines parameter. |
680 | install: dict mapping entries in srcfiles to a tuple of two elements: | 680 | install: dict mapping entries in srcfiles to a tuple of two elements: |
681 | install path (*without* ${D} prefix) and permission value (as a | 681 | install path (*without* ${D} prefix) and permission value (as a |
682 | string, e.g. '0644'). | 682 | string, e.g. '0644'). |
@@ -763,10 +763,9 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
763 | copyfiles = {} | 763 | copyfiles = {} |
764 | if srcfiles: | 764 | if srcfiles: |
765 | instfunclines = [] | 765 | instfunclines = [] |
766 | for i, (newfile, origsrcfile) in enumerate(srcfiles.items()): | 766 | for i, (newfile, param) in enumerate(srcfiles.items()): |
767 | srcfile = origsrcfile | ||
768 | srcurientry = None | 767 | srcurientry = None |
769 | if not srcfile: | 768 | if not 'path' in param or not param['path']: |
770 | srcfile = os.path.basename(newfile) | 769 | srcfile = os.path.basename(newfile) |
771 | srcurientry = 'file://%s' % srcfile | 770 | srcurientry = 'file://%s' % srcfile |
772 | if params and params[i]: | 771 | if params and params[i]: |
@@ -778,7 +777,10 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
778 | appendline('SRC_URI:append%s' % appendoverride, '=', ' ' + srcurientry) | 777 | appendline('SRC_URI:append%s' % appendoverride, '=', ' ' + srcurientry) |
779 | else: | 778 | else: |
780 | appendline('SRC_URI', '+=', srcurientry) | 779 | appendline('SRC_URI', '+=', srcurientry) |
781 | copyfiles[newfile] = srcfile | 780 | param['path'] = srcfile |
781 | else: | ||
782 | srcfile = param['path'] | ||
783 | copyfiles[newfile] = param | ||
782 | if install: | 784 | if install: |
783 | institem = install.pop(newfile, None) | 785 | institem = install.pop(newfile, None) |
784 | if institem: | 786 | if institem: |
@@ -901,7 +903,12 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
901 | outdir = redirect_output | 903 | outdir = redirect_output |
902 | else: | 904 | else: |
903 | outdir = appenddir | 905 | outdir = appenddir |
904 | for newfile, srcfile in copyfiles.items(): | 906 | for newfile, param in copyfiles.items(): |
907 | srcfile = param['path'] | ||
908 | patchdir = param.get('patchdir', ".") | ||
909 | |||
910 | if patchdir != ".": | ||
911 | newfile = os.path.join(os.path.split(newfile)[0], patchdir, os.path.split(newfile)[1]) | ||
905 | filedest = os.path.join(outdir, destsubdir, os.path.basename(srcfile)) | 912 | filedest = os.path.join(outdir, destsubdir, os.path.basename(srcfile)) |
906 | if os.path.abspath(newfile) != os.path.abspath(filedest): | 913 | if os.path.abspath(newfile) != os.path.abspath(filedest): |
907 | if newfile.startswith(tempfile.gettempdir()): | 914 | if newfile.startswith(tempfile.gettempdir()): |