Merge lp:~salgado/linaro-image-tools/bug-814671 into lp:linaro-image-tools/11.11
Proposed by
Guilherme Salgado
Status: | Merged |
---|---|
Approved by: | Mattias Backman |
Approved revision: | 461 |
Merged at revision: | 464 |
Proposed branch: | lp:~salgado/linaro-image-tools/bug-814671 |
Merge into: | lp:linaro-image-tools/11.11 |
Diff against target: |
37 lines (+16/-0) 2 files modified
linaro_image_tools/media_create/chroot_utils.py (+15/-0) linaro_image_tools/media_create/tests/test_media_create.py (+1/-0) |
To merge this branch: | bzr merge lp:~salgado/linaro-image-tools/bug-814671 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mattias Backman (community) | Approve | ||
Review via email: mp+82454@code.launchpad.net |
Description of the change
This makes lmc fail as soon as we detect we cannot run anything in the chroot. That way we can give a clearer error message. Testing this properly is rather tricky, but you can do it manually by unregistering the qemu-arm-static interpreter and then running lmc:
sudo update-binfmts --package qemu-user-static --remove qemu-arm /usr/bin/
linaro-
After that you can register qemu-arm-static again by running the following:
sudo update-binfmts --import qemu-arm
To post a comment you must log in.
Looks good to me. A minor nitpick about the test below.
I think we're fine without unit tests for this change since it's
really straight forward. I have tested it manually according to your
instructions and it works fine.
> === modified file 'linaro_ image_tools/ media_create/ tests/test_ media_create. py' image_tools/ media_create/ tests/test_ media_create. py 2011-11-15 08:07:46 +0000 image_tools/ media_create/ tests/test_ media_create. py 2011-11-16 21:17:32 +0000 hwpack_ install) s %(chroot_ dir)s/usr/ bin',
> --- linaro_
> +++ linaro_
> @@ -2682,6 +2682,7 @@
> 'prepare_chroot %(chroot_dir)s %(tmp_dir)s',
> 'cp %(linaro_
> 'mount proc %(chroot_dir)s/proc -t proc',
> + 'chroot chroot_dir true',
Maybe that could be
'chroot %(chroot_dir)s true',
just in case someone changes the chroot_dir variable?
> 'cp hwpack1.tgz %(chroot_dir)s', hwpack- install '
> ('%(chroot_args)s %(chroot_dir)s linaro-
> '--force-yes /hwpack1.tgz'),
>
>
>