aboutsummaryrefslogtreecommitdiff
path: root/linaro_image_tools/media_create/chroot_utils.py
diff options
context:
space:
mode:
authorGuilherme Salgado <guilherme.salgado@linaro.org>2011-11-16 18:09:18 -0300
committerGuilherme Salgado <guilherme.salgado@linaro.org>2011-11-16 18:09:18 -0300
commit66909db73f2f043edd3c174b44b6ff2bf2034f84 (patch)
tree432dd7fc93a97a7a0a92b3aa6ad965cd6cb21ee1 /linaro_image_tools/media_create/chroot_utils.py
parentb952214c2bdea9cad8d87e05c1b79917e8be672e (diff)
In l-m-c, stop before trying to install hwpacks if we detect that we can't execute anything in the chroot
Diffstat (limited to 'linaro_image_tools/media_create/chroot_utils.py')
-rw-r--r--linaro_image_tools/media_create/chroot_utils.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/linaro_image_tools/media_create/chroot_utils.py b/linaro_image_tools/media_create/chroot_utils.py
index 2196842..ac7c85e 100644
--- a/linaro_image_tools/media_create/chroot_utils.py
+++ b/linaro_image_tools/media_create/chroot_utils.py
@@ -57,6 +57,21 @@ def install_hwpacks(
try:
mount_chroot_proc(chroot_dir)
+ try:
+ # Sometimes the host will have qemu-user-static installed but
+ # another package (i.e. scratchbox) will have mangled its config
+ # and thus we won't be able to chroot and install the hwpack, so
+ # we fail here and tell the user to ensure qemu-arm-static is
+ # setup before trying again.
+ cmd_runner.run(['true'], as_root=True, chroot=chroot_dir).wait()
+ except:
+ print ("Cannot proceed with hwpack installation because "
+ "there doesn't seem to be a binfmt interpreter registered "
+ "to execute armel binaries in the chroot. Please check "
+ "that qemu-user-static is installed and properly "
+ "configured before trying again.")
+ raise
+
for hwpack_file in hwpack_files:
hwpack_verified = False
if os.path.basename(hwpack_file) in verified_files: