misleading warning when building base: core18 snap with 16.04 snapcore/snapcraft docker

Bug #1830389 reported by Evan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Following https://bugs.launchpad.net/snapcraft/+bug/1830388

Snapcraft gives a very misleading warning about core18 being missing but needed when building in a 16.04 Docker. It goes on to say that the environment should, vaguely, be "properly set up" and in the very next breath says you can dismiss the warning if, again vaguely, "appropriate measures have been taken."

Shouldn't this just error out with "The specified base and Docker image do not match. Use an Ubuntu 18.04-based Docker image to match 'base: core18' in your snap/snapcraft.yaml"?

~/example❯ cat snap/snapcraft.yaml
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

parts:
  my-part:
    # See 'snapcraft plugins'
    plugin: nil
~/example❯ docker run -v $(pwd):$(pwd) -w $(pwd) snapcore/snapcraft:beta snapcraft
Locale not set! Snapcraft will temporarily use C.UTF-8
Using 'snap/snapcraft.yaml': Project assets will be searched for from the 'snap' directory.
The following snaps are required but not installed as snapcraft is running inside docker: core18.
Please ensure the environment is properly setup before continuing.
Ignore this message if the appropriate measures have already been taken
Pulling my-part
Building my-part
Staging my-part
Priming my-part
Snapping 'my-snap-name' ...

Snapped my-snap-name_0.1_amd64.snap
~/example❯ docker run -v $(pwd):$(pwd) -w $(pwd) snapcore/snapcraft:beta cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.