Merge lp:~salgado/linaro-image-tools/bug-643601 into lp:linaro-image-tools/11.11

Proposed by Guilherme Salgado
Status: Merged
Merged at revision: 95
Proposed branch: lp:~salgado/linaro-image-tools/bug-643601
Merge into: lp:linaro-image-tools/11.11
Diff against target: 38 lines (+9/-3)
1 file modified
linaro-media-create (+9/-3)
To merge this branch: bzr merge lp:~salgado/linaro-image-tools/bug-643601
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+36042@code.launchpad.net

Description of the change

This fixes bug 643601

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Looks good to me.

Thanks,

James

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'linaro-media-create'
2--- linaro-media-create 2010-09-17 16:03:59 +0000
3+++ linaro-media-create 2010-09-20 17:50:58 +0000
4@@ -298,14 +298,17 @@
5 ensure_command qemu-arm-static qemu-arm-static
6
7 tmp_dir=$(mktemp -d)
8- trap "rm -rf $tmp_dir" EXIT
9+ chroot=${tmp_dir}/binary
10+ # Make sure the tmp_dir where we unpack the tarball is removed when this
11+ # script exits.
12+ trap "sudo umount ${chroot}/proc || true; sudo rm -rf $tmp_dir" EXIT
13+
14 sudo tar -xf $BINARY_TARBALL -C $tmp_dir
15
16 # XXX: Assume linaro-hwpack-install lives on the same directory as this
17 # script. This is far from optimal but should do for now.
18 LINARO_HWPACK_INSTALL=$(dirname $0)/linaro-hwpack-install
19
20- chroot=${tmp_dir}/binary
21 sudo mv -f ${chroot}/etc/resolv.conf ${tmp_dir}/resolv.conf.orig
22 sudo cp /etc/resolv.conf ${chroot}/etc/resolv.conf
23
24@@ -316,10 +319,13 @@
25 sudo cp $LINARO_HWPACK_INSTALL ${chroot}/usr/bin
26 sudo cp "$HWPACK_FILE" "$chroot"
27
28+ # Actually install the hwpack.
29 sudo mount proc ${chroot}/proc -t proc
30 sudo chroot "$chroot" linaro-hwpack-install /$(basename "$HWPACK_FILE")
31+
32+ # Revert some changes we did to the rootfs as we don't want them in the
33+ # image.
34 sudo umount ${chroot}/proc
35-
36 sudo mv -f ${tmp_dir}/resolv.conf.orig ${chroot}/etc/resolv.conf
37 sudo mv -f ${tmp_dir}/hosts.orig ${chroot}/etc/hosts
38 sudo rm -f ${chroot}/usr/bin/qemu-arm-static

Subscribers

People subscribed via source and target branches