summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-17 15:19:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-02 05:52:11 -0700
commit8cb5c0216750f690ce9208c54888d3729b1981bc (patch)
tree79ba3d30138bdd58204bbccba7ba110bbdc88713
parentc6fda196cbbfd749b8bf10ad97dc373217d8ed2e (diff)
downloadpoky-8cb5c0216750f690ce9208c54888d3729b1981bc.tar.gz
image.bbclass: Convert runtime_mapping_rename to event handler
(From OE-Core rev: 05e67417ca3174d1f9279f0de308a9d40933b461) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image.bbclass13
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 () {
111 bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp)))) 111 bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp))))
112 112
113 d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features))) 113 d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
114}
115
116python image_handler () {
117 if not isinstance(e, bb.event.RecipeParsed):
118 return
114 119
115 # If we don't do this we try and run the mapping hooks while parsing which is slow 120 # If we don't do this we try and run the mapping hooks while parsing which is slow
116 # bitbake should really provide something to let us know this... 121 # bitbake should really provide something to let us know this...
117 if d.getVar('BB_WORKERCONTEXT', True) is not None: 122 if e.data.getVar('BB_WORKERCONTEXT', True) is not None:
118 runtime_mapping_rename("PACKAGE_INSTALL", d) 123 runtime_mapping_rename("PACKAGE_INSTALL", e.data)
119 runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d) 124 runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", e.data)
125
120} 126}
127addhandler image_handler
121 128
122# 129#
123# Get a list of files containing device tables to create. 130# Get a list of files containing device tables to create.