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
=== modified file 'linaro-media-create'
--- linaro-media-create 2010-09-17 16:03:59 +0000
+++ linaro-media-create 2010-09-20 17:50:58 +0000
@@ -298,14 +298,17 @@
298 ensure_command qemu-arm-static qemu-arm-static298 ensure_command qemu-arm-static qemu-arm-static
299299
300 tmp_dir=$(mktemp -d)300 tmp_dir=$(mktemp -d)
301 trap "rm -rf $tmp_dir" EXIT301 chroot=${tmp_dir}/binary
302 # Make sure the tmp_dir where we unpack the tarball is removed when this
303 # script exits.
304 trap "sudo umount ${chroot}/proc || true; sudo rm -rf $tmp_dir" EXIT
305
302 sudo tar -xf $BINARY_TARBALL -C $tmp_dir306 sudo tar -xf $BINARY_TARBALL -C $tmp_dir
303307
304 # XXX: Assume linaro-hwpack-install lives on the same directory as this308 # XXX: Assume linaro-hwpack-install lives on the same directory as this
305 # script. This is far from optimal but should do for now.309 # script. This is far from optimal but should do for now.
306 LINARO_HWPACK_INSTALL=$(dirname $0)/linaro-hwpack-install310 LINARO_HWPACK_INSTALL=$(dirname $0)/linaro-hwpack-install
307311
308 chroot=${tmp_dir}/binary
309 sudo mv -f ${chroot}/etc/resolv.conf ${tmp_dir}/resolv.conf.orig312 sudo mv -f ${chroot}/etc/resolv.conf ${tmp_dir}/resolv.conf.orig
310 sudo cp /etc/resolv.conf ${chroot}/etc/resolv.conf313 sudo cp /etc/resolv.conf ${chroot}/etc/resolv.conf
311314
@@ -316,10 +319,13 @@
316 sudo cp $LINARO_HWPACK_INSTALL ${chroot}/usr/bin319 sudo cp $LINARO_HWPACK_INSTALL ${chroot}/usr/bin
317 sudo cp "$HWPACK_FILE" "$chroot"320 sudo cp "$HWPACK_FILE" "$chroot"
318321
322 # Actually install the hwpack.
319 sudo mount proc ${chroot}/proc -t proc323 sudo mount proc ${chroot}/proc -t proc
320 sudo chroot "$chroot" linaro-hwpack-install /$(basename "$HWPACK_FILE")324 sudo chroot "$chroot" linaro-hwpack-install /$(basename "$HWPACK_FILE")
325
326 # Revert some changes we did to the rootfs as we don't want them in the
327 # image.
321 sudo umount ${chroot}/proc328 sudo umount ${chroot}/proc
322
323 sudo mv -f ${tmp_dir}/resolv.conf.orig ${chroot}/etc/resolv.conf329 sudo mv -f ${tmp_dir}/resolv.conf.orig ${chroot}/etc/resolv.conf
324 sudo mv -f ${tmp_dir}/hosts.orig ${chroot}/etc/hosts330 sudo mv -f ${tmp_dir}/hosts.orig ${chroot}/etc/hosts
325 sudo rm -f ${chroot}/usr/bin/qemu-arm-static331 sudo rm -f ${chroot}/usr/bin/qemu-arm-static

Subscribers

People subscribed via source and target branches