diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-17 15:19:38 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-02 05:47:39 -0700 |
commit | 05e67417ca3174d1f9279f0de308a9d40933b461 (patch) | |
tree | f21498a5c3c65015d5046eea421d235e4c70f34d /meta/classes | |
parent | d27692e9421206177fd572a79298f5988607ce21 (diff) | |
download | openembedded-core-05e67417ca3174d1f9279f0de308a9d40933b461.tar.gz openembedded-core-05e67417ca3174d1f9279f0de308a9d40933b461.tar.bz2 openembedded-core-05e67417ca3174d1f9279f0de308a9d40933b461.zip |
image.bbclass: Convert runtime_mapping_rename to event handler
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image.bbclass | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 72720f1ffd..0f6ab381cd 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -111,13 +111,20 @@ python () { bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp)))) d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features))) +} + +python image_handler () { + if not isinstance(e, bb.event.RecipeParsed): + return # If we don't do this we try and run the mapping hooks while parsing which is slow # bitbake should really provide something to let us know this... - if d.getVar('BB_WORKERCONTEXT', True) is not None: - runtime_mapping_rename("PACKAGE_INSTALL", d) - runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d) + if e.data.getVar('BB_WORKERCONTEXT', True) is not None: + runtime_mapping_rename("PACKAGE_INSTALL", e.data) + runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", e.data) + } +addhandler image_handler # # Get a list of files containing device tables to create. |