diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-17 12:12:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-18 12:12:07 +0100 |
commit | 0448714c52bc1e9584a5282cffdcaa404fb0618a (patch) | |
tree | d9730b47b4d40e70b0f1080cde18534b59e8de25 /bin/bitbake-layers | |
parent | 279770c42d4c63aa2cebce331b55a92a564b50ac (diff) | |
download | bitbake-contrib-0448714c52bc1e9584a5282cffdcaa404fb0618a.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake-layers')
-rwxr-xr-x | bin/bitbake-layers | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/bin/bitbake-layers b/bin/bitbake-layers index 5116e598b..62b51b058 100755 --- a/bin/bitbake-layers +++ b/bin/bitbake-layers @@ -595,7 +595,7 @@ build results (as the layer priority order has effectively changed). return layerdir return None - appended_recipes = [] + applied_appends = [] for layer in layers: overlayed = [] for f in self.bbhandler.cooker.collection.overlayed.iterkeys(): @@ -623,31 +623,27 @@ build results (as the layer priority order has effectively changed). logger.warn('Overwriting file %s', fdest) bb.utils.copyfile(f1full, fdest) if ext == '.bb': - if f1 in self.bbhandler.cooker.collection.appendlist: - appends = self.bbhandler.cooker.collection.appendlist[f1] - if appends: - logger.plain(' Applying appends to %s' % fdest ) - for appendname in appends: - if layer_path_match(appendname): - self.apply_append(appendname, fdest) - appended_recipes.append(f1) + for append in self.bbhandler.cooker.collection.get_file_appends(f1full): + if layer_path_match(append): + logger.plain(' Applying append %s to %s' % (append, fdest)) + self.apply_append(append, fdest) + applied_appends.append(append) # Take care of when some layers are excluded and yet we have included bbappends for those recipes - for recipename in self.bbhandler.cooker.collection.appendlist.iterkeys(): - if recipename not in appended_recipes: - appends = self.bbhandler.cooker.collection.appendlist[recipename] + for b in self.bbhandler.cooker.collection.bbappends: + (recipename, appendname) = b + if appendname not in applied_appends: first_append = None - for appendname in appends: - layer = layer_path_match(appendname) - if layer: - if first_append: - self.apply_append(appendname, first_append) - else: - fdest = appendname[len(layer):] - fdest = os.path.normpath(os.sep.join([outputdir,fdest])) - bb.utils.mkdirhier(os.path.dirname(fdest)) - bb.utils.copyfile(appendname, fdest) - first_append = fdest + layer = layer_path_match(appendname) + if layer: + if first_append: + self.apply_append(appendname, first_append) + else: + fdest = appendname[len(layer):] + fdest = os.path.normpath(os.sep.join([outputdir,fdest])) + bb.utils.mkdirhier(os.path.dirname(fdest)) + bb.utils.copyfile(appendname, fdest) + first_append = fdest # Get the regex for the first layer in our list (which is where the conf/layer.conf file will # have come from) @@ -723,7 +719,7 @@ build results (as the layer priority order has effectively changed). Lists recipes with the bbappends that apply to them as subitems. """ self.init_bbhandler() - if not self.bbhandler.cooker.collection.appendlist: + if not self.bbhandler.cooker.collection.bbappends: logger.plain('No append files found') return 0 |