summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-04 17:43:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-05 13:14:57 +0000
commit44260c2c48c49d5ceb04404316b0100956722643 (patch)
treec01252cf1226c2c143545e5b73166790189f298b /meta/classes
parentba3318e3690ff5071f846071d11d2ad8dd97b465 (diff)
downloadpoky-44260c2c48c49d5ceb04404316b0100956722643.tar.gz
populate_sdk_base/image: Fix races for variable mappings
When using the -c populate_sdk option, images are not generated quite as they should be under certain circumstances. For example the dropbear feature may not get replaced with openssh, leading to both being installed with an appropriate rootfs failure. This patch moves the remapping logic to later points in the code, ensuring there is no conflict. The result is slightly simpler too as an added bonus. [YOCTO #3749] (From OE-Core rev: 90cfa16bd4a02ada84ef94f6ae6f182beb8bdc01) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass17
-rw-r--r--meta/classes/populate_sdk_base.bbclass9
2 files changed, 6 insertions, 20 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 19564d81b6..68bd342d61 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -117,6 +117,10 @@ python () {
117 117
118 d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features))) 118 d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
119 119
120 if d.getVar('BB_WORKERCONTEXT', True) is not None:
121 runtime_mapping_rename("PACKAGE_INSTALL", d)
122 runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d)
123
120 # Ensure we have the vendor list for complementary package handling 124 # Ensure we have the vendor list for complementary package handling
121 ml_vendor_list = "" 125 ml_vendor_list = ""
122 multilibs = d.getVar('MULTILIBS', True) or "" 126 multilibs = d.getVar('MULTILIBS', True) or ""
@@ -129,19 +133,6 @@ python () {
129 d.setVar('MULTILIB_VENDORS', ml_vendor_list) 133 d.setVar('MULTILIB_VENDORS', ml_vendor_list)
130} 134}
131 135
132python image_handler () {
133 if not isinstance(e, bb.event.RecipeParsed):
134 return
135
136 # If we don't do this we try and run the mapping hooks while parsing which is slow
137 # bitbake should really provide something to let us know this...
138 if e.data.getVar('BB_WORKERCONTEXT', True) is not None:
139 runtime_mapping_rename("PACKAGE_INSTALL", e.data)
140 runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", e.data)
141
142}
143addhandler image_handler
144
145# 136#
146# Get a list of files containing device tables to create. 137# Get a list of files containing device tables to create.
147# * IMAGE_DEVICE_TABLE is the old name to an absolute path to a device table file 138# * IMAGE_DEVICE_TABLE is the old name to an absolute path to a device table file
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 88de1e48ac..7af2d2e9e2 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -29,14 +29,9 @@ EXCLUDE_FROM_WORLD = "1"
29 29
30SDK_PACKAGING_FUNC ?= "create_shar" 30SDK_PACKAGING_FUNC ?= "create_shar"
31 31
32python () {
33 # If we don't do this we try and run the mapping hooks while parsing which is slow
34 # bitbake should really provide something to let us know this...
35 if bb.data.getVar('BB_WORKERCONTEXT', d, True) is not None:
36 runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", d)
37}
38
39fakeroot python do_populate_sdk() { 32fakeroot python do_populate_sdk() {
33 runtime_mapping_rename("TOOLCHAIN_TARGET_TASK", d)
34
40 bb.build.exec_func("populate_sdk_image", d) 35 bb.build.exec_func("populate_sdk_image", d)
41 36
42 # Handle multilibs in the SDK environment, siteconfig, etc files... 37 # Handle multilibs in the SDK environment, siteconfig, etc files...