Merge lp:~smoser/maas-images/trunk.ppa-newsquash into lp:maas-images

Proposed by Scott Moser
Status: Merged
Merged at revision: 382
Proposed branch: lp:~smoser/maas-images/trunk.ppa-newsquash
Merge into: lp:maas-images
Diff against target: 16 lines (+5/-1)
1 file modified
bin/maas-cloudimg2eph2 (+5/-1)
To merge this branch: bzr merge lp:~smoser/maas-images/trunk.ppa-newsquash
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+331976@code.launchpad.net

Commit message

maas-cloudimg2eph2: repack squash if additional archives are used.

If --proposed or M2E_ADD_REPOS or M2E_ADD_PACKAGES are set, then that
means we should re-pack squashfs.

This check is not perfect at all, as other things might cause that, but
it is required to get a new squashfs created for the path already in
existance.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/maas-cloudimg2eph2'
--- bin/maas-cloudimg2eph2 2016-10-06 13:03:32 +0000
+++ bin/maas-cloudimg2eph2 2017-10-06 20:54:19 +0000
@@ -640,7 +640,11 @@
640 if [ "$fmt" = "squashfs-image" ]; then640 if [ "$fmt" = "squashfs-image" ]; then
641 local squash_out=""641 local squash_out=""
642 squash_out=$(dirname "$output")/$(basename "$src")642 squash_out=$(dirname "$output")/$(basename "$src")
643 if [ -n "${proposed_flag}" ]; then643
644 # This is not perfect, but if these things imply a change
645 # to the image rather than re-using the input.
646 if [ -n "${proposed_flag}" ] ||
647 [ -n "${M2E_ADD_REPOS}" -o -n "${M2E_ADD_PACKAGES}" ]; then
644 debug 1 "creating a new squashfs in $squash_out from $imgfile"648 debug 1 "creating a new squashfs in $squash_out from $imgfile"
645 sudo mount-image-callback "$imgfile" --read-only -- sh -ec '649 sudo mount-image-callback "$imgfile" --read-only -- sh -ec '
646 src="$1"; out="$2"; owner="$3"; tmp="$out.$$"650 src="$1"; out="$2"; owner="$3"; tmp="$out.$$"

Subscribers

People subscribed via source and target branches