~andreserl/maas/maas_images_signed_kernel

« back to all changes in this revision

Viewing changes to bin/maas-cloudimg2eph2

  • Committer: Scott Moser
  • Date: 2017-10-06 20:57:40 UTC
  • mfrom: (381.1.1 trunk.ppa-newsqaush)
  • Revision ID: smoser@ubuntu.com-20171006205740-r5pfw39flv18eknc
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
640
640
    if [ "$fmt" = "squashfs-image" ]; then
641
641
        local squash_out=""
642
642
        squash_out=$(dirname "$output")/$(basename "$src")
643
 
        if [ -n "${proposed_flag}" ]; then
 
643
 
 
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
648
            debug 1 "creating a new squashfs in $squash_out from $imgfile"
645
649
            sudo mount-image-callback "$imgfile" --read-only -- sh -ec '
646
650
                src="$1"; out="$2"; owner="$3"; tmp="$out.$$"