From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Cc: "Eggleton, Paul" <paul.eggleton@intel.com>
Subject: [PATCH WIP] bitbake-layers: Convert flatten to use collections.bbappends
Date: Mon, 30 Mar 2015 13:56:32 +0100 [thread overview]
Message-ID: <1427720192.14020.301.camel@linuxfoundation.org> (raw)
flatten support currently looks broken since it doesn't appear to
deal with handling "%" support in bbappend file names.
This patch convert it to use collections.get_file_appends() which
correctly handles "%" support.
[FIXME: Also converts collections.appendlist -> collections.bbappends
but this code also appears to be missing "%" support?]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[Paul: I have to admit I'm struggling to understand what first_append does
so was struggling to further clean this up]
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 9824629..e30e0f6 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -622,31 +622,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)
+ 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)
appended_recipes.append(f1)
# 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():
+ for b in self.bbhandler.cooker.collection.bbappends:
+ (recipename, appendname) = b
if recipename not in appended_recipes:
- appends = self.bbhandler.cooker.collection.appendlist[recipename]
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)
@@ -722,7 +718,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
reply other threads:[~2015-03-30 12:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427720192.14020.301.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=paul.eggleton@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox