summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/package_manager.py19
-rw-r--r--meta/lib/oe/sdk.py12
-rw-r--r--meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb5
3 files changed, 27 insertions, 9 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 5ac729455e..20a41d53f8 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -370,7 +370,7 @@ class PackageManager(object, metaclass=ABCMeta):
370 self._handle_intercept_failure(registered_pkgs) 370 self._handle_intercept_failure(registered_pkgs)
371 371
372 372
373 def run_intercepts(self): 373 def run_intercepts(self, populate_sdk=None):
374 intercepts_dir = self.intercepts_dir 374 intercepts_dir = self.intercepts_dir
375 375
376 bb.note("Running intercept scripts:") 376 bb.note("Running intercept scripts:")
@@ -392,9 +392,22 @@ class PackageManager(object, metaclass=ABCMeta):
392 output = subprocess.check_output(script_full, stderr=subprocess.STDOUT) 392 output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
393 if output: bb.note(output.decode("utf-8")) 393 if output: bb.note(output.decode("utf-8"))
394 except subprocess.CalledProcessError as e: 394 except subprocess.CalledProcessError as e:
395 bb.warn("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
396 bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8"))) 395 bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
397 self._postpone_to_first_boot(script_full) 396 if populate_sdk == 'host':
397 bb.warn("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
398 elif populate_sdk == 'target':
399 if "qemuwrapper: qemu usermode is not supported" in e.output.decode("utf-8"):
400 bb.warn("The postinstall intercept hook '%s' could not be executed due to missing qemu usermode support, details in %s/log.do_%s"
401 % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
402 else:
403 bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
404 else:
405 if "qemuwrapper: qemu usermode is not supported" in e.output.decode("utf-8"):
406 bb.note("The postinstall intercept hook '%s' could not be executed due to missing qemu usermode support, details in %s/log.do_%s"
407 % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
408 self._postpone_to_first_boot(script_full)
409 else:
410 bb.fatal("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
398 411
399 @abstractmethod 412 @abstractmethod
400 def update(self): 413 def update(self):
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index d6a503372a..0d39ea8a91 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -209,7 +209,7 @@ class RpmSdk(Sdk):
209 209
210 self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY')) 210 self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
211 211
212 self.target_pm.run_intercepts() 212 self.target_pm.run_intercepts(populate_sdk='target')
213 213
214 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND")) 214 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
215 215
@@ -220,7 +220,7 @@ class RpmSdk(Sdk):
220 self._populate_sysroot(self.host_pm, self.host_manifest) 220 self._populate_sysroot(self.host_pm, self.host_manifest)
221 self.install_locales(self.host_pm) 221 self.install_locales(self.host_pm)
222 222
223 self.host_pm.run_intercepts() 223 self.host_pm.run_intercepts(populate_sdk='host')
224 224
225 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 225 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
226 226
@@ -297,7 +297,7 @@ class OpkgSdk(Sdk):
297 297
298 self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY')) 298 self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
299 299
300 self.target_pm.run_intercepts() 300 self.target_pm.run_intercepts(populate_sdk='target')
301 301
302 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND")) 302 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
303 303
@@ -308,7 +308,7 @@ class OpkgSdk(Sdk):
308 self._populate_sysroot(self.host_pm, self.host_manifest) 308 self._populate_sysroot(self.host_pm, self.host_manifest)
309 self.install_locales(self.host_pm) 309 self.install_locales(self.host_pm)
310 310
311 self.host_pm.run_intercepts() 311 self.host_pm.run_intercepts(populate_sdk='host')
312 312
313 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 313 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
314 314
@@ -386,7 +386,7 @@ class DpkgSdk(Sdk):
386 386
387 self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY')) 387 self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
388 388
389 self.target_pm.run_intercepts() 389 self.target_pm.run_intercepts(populate_sdk='target')
390 390
391 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND")) 391 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
392 392
@@ -399,7 +399,7 @@ class DpkgSdk(Sdk):
399 self._populate_sysroot(self.host_pm, self.host_manifest) 399 self._populate_sysroot(self.host_pm, self.host_manifest)
400 self.install_locales(self.host_pm) 400 self.install_locales(self.host_pm)
401 401
402 self.host_pm.run_intercepts() 402 self.host_pm.run_intercepts(populate_sdk='host')
403 403
404 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND")) 404 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
405 405
diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index 4b1b46d0bb..4aada5232d 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -20,6 +20,11 @@ do_install () {
20#!/bin/sh 20#!/bin/sh
21set -x 21set -x
22 22
23if [ ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)} = False ]; then
24 echo "qemuwrapper: qemu usermode is not supported"
25fi
26
27
23$qemu_binary $qemu_options "\$@" 28$qemu_binary $qemu_options "\$@"
24EOF 29EOF
25 30