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
1=== modified file 'bin/maas-cloudimg2eph2'
2--- bin/maas-cloudimg2eph2 2016-10-06 13:03:32 +0000
3+++ bin/maas-cloudimg2eph2 2017-10-06 20:54:19 +0000
4@@ -640,7 +640,11 @@
5 if [ "$fmt" = "squashfs-image" ]; then
6 local squash_out=""
7 squash_out=$(dirname "$output")/$(basename "$src")
8- if [ -n "${proposed_flag}" ]; then
9+
10+ # This is not perfect, but if these things imply a change
11+ # to the image rather than re-using the input.
12+ if [ -n "${proposed_flag}" ] ||
13+ [ -n "${M2E_ADD_REPOS}" -o -n "${M2E_ADD_PACKAGES}" ]; then
14 debug 1 "creating a new squashfs in $squash_out from $imgfile"
15 sudo mount-image-callback "$imgfile" --read-only -- sh -ec '
16 src="$1"; out="$2"; owner="$3"; tmp="$out.$$"

Subscribers

People subscribed via source and target branches