=== modified file 'linaro_image_tools/media_create/chroot_utils.py'
@@ -57,6 +57,21 @@
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:
=== modified file 'linaro_image_tools/media_create/tests/test_media_create.py'
@@ -2716,6 +2716,7 @@
'prepare_chroot %(chroot_dir)s %(tmp_dir)s',
'cp %(linaro_hwpack_install)s %(chroot_dir)s/usr/bin',
'mount proc %(chroot_dir)s/proc -t proc',
+ 'chroot %(chroot_dir)s true',
'cp hwpack1.tgz %(chroot_dir)s',
('%(chroot_args)s %(chroot_dir)s linaro-hwpack-install '
'--force-yes /hwpack1.tgz'),