summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-layers
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-17 12:12:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-19 18:05:47 +0100
commit67a6a4d6c0f060dd3b383aa28195c1c6a8e581d6 (patch)
tree8b8eadbf4befe869416dc54cd409517aed4889a4 /bitbake/bin/bitbake-layers
parent3c3ff928822a525024c7a679a517bcf53af5022f (diff)
downloadpoky-67a6a4d6c0f060dd3b383aa28195c1c6a8e581d6.tar.gz
bitbake: bitbake-layers: Convert flatten to use collections.bbappends
flatten support currently looks broken since it doesn't appear to deal with handling "%" support in bbappend file names. This patch converts it to use collections.get_file_appends() which correctly handles "%" support. (Bitbake rev: 0448714c52bc1e9584a5282cffdcaa404fb0618a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-layers')
-rwxr-xr-xbitbake/bin/bitbake-layers44
1 files changed, 20 insertions, 24 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 5116e598b3..62b51b0583 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -595,7 +595,7 @@ build results (as the layer priority order has effectively changed).
595 return layerdir 595 return layerdir
596 return None 596 return None
597 597
598 appended_recipes = [] 598 applied_appends = []
599 for layer in layers: 599 for layer in layers:
600 overlayed = [] 600 overlayed = []
601 for f in self.bbhandler.cooker.collection.overlayed.iterkeys(): 601 for f in self.bbhandler.cooker.collection.overlayed.iterkeys():
@@ -623,31 +623,27 @@ build results (as the layer priority order has effectively changed).
623 logger.warn('Overwriting file %s', fdest) 623 logger.warn('Overwriting file %s', fdest)
624 bb.utils.copyfile(f1full, fdest) 624 bb.utils.copyfile(f1full, fdest)
625 if ext == '.bb': 625 if ext == '.bb':
626 if f1 in self.bbhandler.cooker.collection.appendlist: 626 for append in self.bbhandler.cooker.collection.get_file_appends(f1full):
627 appends = self.bbhandler.cooker.collection.appendlist[f1] 627 if layer_path_match(append):
628 if appends: 628 logger.plain(' Applying append %s to %s' % (append, fdest))
629 logger.plain(' Applying appends to %s' % fdest ) 629 self.apply_append(append, fdest)
630 for appendname in appends: 630 applied_appends.append(append)
631 if layer_path_match(appendname):
632 self.apply_append(appendname, fdest)
633 appended_recipes.append(f1)
634 631
635 # Take care of when some layers are excluded and yet we have included bbappends for those recipes 632 # Take care of when some layers are excluded and yet we have included bbappends for those recipes
636 for recipename in self.bbhandler.cooker.collection.appendlist.iterkeys(): 633 for b in self.bbhandler.cooker.collection.bbappends:
637 if recipename not in appended_recipes: 634 (recipename, appendname) = b
638 appends = self.bbhandler.cooker.collection.appendlist[recipename] 635 if appendname not in applied_appends:
639 first_append = None 636 first_append = None
640 for appendname in appends: 637 layer = layer_path_match(appendname)
641 layer = layer_path_match(appendname) 638 if layer:
642 if layer: 639 if first_append:
643 if first_append: 640 self.apply_append(appendname, first_append)
644 self.apply_append(appendname, first_append) 641 else:
645 else: 642 fdest = appendname[len(layer):]
646 fdest = appendname[len(layer):] 643 fdest = os.path.normpath(os.sep.join([outputdir,fdest]))
647 fdest = os.path.normpath(os.sep.join([outputdir,fdest])) 644 bb.utils.mkdirhier(os.path.dirname(fdest))
648 bb.utils.mkdirhier(os.path.dirname(fdest)) 645 bb.utils.copyfile(appendname, fdest)
649 bb.utils.copyfile(appendname, fdest) 646 first_append = fdest
650 first_append = fdest
651 647
652 # Get the regex for the first layer in our list (which is where the conf/layer.conf file will 648 # Get the regex for the first layer in our list (which is where the conf/layer.conf file will
653 # have come from) 649 # have come from)
@@ -723,7 +719,7 @@ build results (as the layer priority order has effectively changed).
723Lists recipes with the bbappends that apply to them as subitems. 719Lists recipes with the bbappends that apply to them as subitems.
724""" 720"""
725 self.init_bbhandler() 721 self.init_bbhandler()
726 if not self.bbhandler.cooker.collection.appendlist: 722 if not self.bbhandler.cooker.collection.bbappends:
727 logger.plain('No append files found') 723 logger.plain('No append files found')
728 return 0 724 return 0
729 725