[Merge] ~rcj/livecd-rootfs/+git/livecd-rootfs:bugfix/snap_base_regression into livecd-rootfs:ubuntu/master

Robert C Jennings robert.jennings at canonical.com
Tue Feb 25 22:18:25 UTC 2020

Robert C Jennings has proposed merging ~rcj/livecd-rootfs/+git/livecd-rootfs:bugfix/snap_base_regression into livecd-rootfs:ubuntu/master.

Commit message:
Address snap base regression after snap-tool removal

With the removal of snap-tool failures are seen in image builds that do
not have the 'core' snap included by the seed.  This is the case for the
minimized subproject of the ubuntu-cpc project where lxd/core is removed.
In that subproject, any binary hook which adds a snap that is based
on 'core' will not add 'core' and fail 'snap debug validate-seed'.
snap-tool included the following logic in the 'snap-tool info' when
determining snap bases:

    # Have "base" initialized to something meaningful.
    if self.is_core_snap():
        snap_data["snap"]["base"] = ""
    elif snap_data["snap"].get("base") is None:
        snap_data["snap"]["base"] = "core"

The snap store does not return a base if the base is core which makes
this necessary.  This patch looks for the base in 'snap info' output
and if none is found (and the snap is not snapd or core) it assumes the
base is 'core' and installs it.  This restores the behavior lost in the
migration from snap-tool to snap cli.

Requested reviews:
  Ubuntu Core Development Team (ubuntu-core-dev)
Related bugs:
  Bug #1864252 in livecd-rootfs (Ubuntu): "preseeded snap installs fail in images"

For more details, see:
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~rcj/livecd-rootfs/+git/livecd-rootfs:bugfix/snap_base_regression into livecd-rootfs:ubuntu/master.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 1702 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-reviews/attachments/20200225/be8db4dc/attachment.diff>

More information about the Ubuntu-reviews mailing list