summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
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/image.bbclass
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/image.bbclass')
-rw-r--r--meta/classes/image.bbclass17
1 files changed, 4 insertions, 13 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