diff options
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/recipeutils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 1d793693bf..d86873056f 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -776,14 +776,22 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
776 | else: | 776 | else: |
777 | srcfile = os.path.basename(newfile) | 777 | srcfile = os.path.basename(newfile) |
778 | srcurientry = 'file://%s' % srcfile | 778 | srcurientry = 'file://%s' % srcfile |
779 | oldentry = None | ||
780 | for uri in rd.getVar('SRC_URI').split(): | ||
781 | if srcurientry in uri: | ||
782 | oldentry = uri | ||
779 | if params and params[i]: | 783 | if params and params[i]: |
780 | srcurientry = '%s;%s' % (srcurientry, ';'.join('%s=%s' % (k,v) for k,v in params[i].items())) | 784 | srcurientry = '%s;%s' % (srcurientry, ';'.join('%s=%s' % (k,v) for k,v in params[i].items())) |
781 | # Double-check it's not there already | 785 | # Double-check it's not there already |
782 | # FIXME do we care if the entry is added by another bbappend that might go away? | 786 | # FIXME do we care if the entry is added by another bbappend that might go away? |
783 | if not srcurientry in rd.getVar('SRC_URI').split(): | 787 | if not srcurientry in rd.getVar('SRC_URI').split(): |
784 | if machine: | 788 | if machine: |
789 | if oldentry: | ||
790 | appendline('SRC_URI:remove%s' % appendoverride, '=', ' ' + oldentry) | ||
785 | appendline('SRC_URI:append%s' % appendoverride, '=', ' ' + srcurientry) | 791 | appendline('SRC_URI:append%s' % appendoverride, '=', ' ' + srcurientry) |
786 | else: | 792 | else: |
793 | if oldentry: | ||
794 | appendline('SRC_URI:remove', '=', oldentry) | ||
787 | appendline('SRC_URI', '+=', srcurientry) | 795 | appendline('SRC_URI', '+=', srcurientry) |
788 | param['path'] = srcfile | 796 | param['path'] = srcfile |
789 | else: | 797 | else: |