diff options
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 872ff97b89..b04992c66d 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -666,7 +666,7 @@ def get_bbappend_path(d, destlayerdir, wildcardver=False): | |||
666 | return (appendpath, pathok) | 666 | return (appendpath, pathok) |
667 | 667 | ||
668 | 668 | ||
669 | def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None, redirect_output=None): | 669 | def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, machine=None, extralines=None, removevalues=None, redirect_output=None, params=None): |
670 | """ | 670 | """ |
671 | Writes a bbappend file for a recipe | 671 | Writes a bbappend file for a recipe |
672 | Parameters: | 672 | Parameters: |
@@ -696,6 +696,9 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
696 | redirect_output: | 696 | redirect_output: |
697 | If specified, redirects writing the output file to the | 697 | If specified, redirects writing the output file to the |
698 | specified directory (for dry-run purposes) | 698 | specified directory (for dry-run purposes) |
699 | params: | ||
700 | Parameters to use when adding entries to SRC_URI. If specified, | ||
701 | should be a list of dicts with the same length as srcfiles. | ||
699 | """ | 702 | """ |
700 | 703 | ||
701 | if not removevalues: | 704 | if not removevalues: |
@@ -762,12 +765,14 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
762 | copyfiles = {} | 765 | copyfiles = {} |
763 | if srcfiles: | 766 | if srcfiles: |
764 | instfunclines = [] | 767 | instfunclines = [] |
765 | for newfile, origsrcfile in srcfiles.items(): | 768 | for i, (newfile, origsrcfile) in enumerate(srcfiles.items()): |
766 | srcfile = origsrcfile | 769 | srcfile = origsrcfile |
767 | srcurientry = None | 770 | srcurientry = None |
768 | if not srcfile: | 771 | if not srcfile: |
769 | srcfile = os.path.basename(newfile) | 772 | srcfile = os.path.basename(newfile) |
770 | srcurientry = 'file://%s' % srcfile | 773 | srcurientry = 'file://%s' % srcfile |
774 | if params and params[i]: | ||
775 | srcurientry = '%s;%s' % (srcurientry, ';'.join('%s=%s' % (k,v) for k,v in params[i].items())) | ||
771 | # Double-check it's not there already | 776 | # Double-check it's not there already |
772 | # FIXME do we care if the entry is added by another bbappend that might go away? | 777 | # FIXME do we care if the entry is added by another bbappend that might go away? |
773 | if not srcurientry in rd.getVar('SRC_URI').split(): | 778 | if not srcurientry in rd.getVar('SRC_URI').split(): |