Score:0

Snapcraft: Why doesn't dump do anything?

my flag

I am a complete beginner and I seem to have skipped some important section in the docs, but let's say I have these files:

$ tree
.
├── snap
│   └── snapcraft.yaml
└── yolo
    └── test.txt

and the contents of the snapcraft.yaml are:

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: dump
    source: yolo

Then I would expect to run the command snapcraft in the root of these two directories and get a snap file my-snap-name_0.1_amd64.snap which I can then proceed to inspect with unsquashfs -l *.snap and I should see the file test.txt somewhere in it.

Should I not? What do I not understand?

Score:0
my flag

Found the answer: Because I used the multipass plugin. Unknown why, but it doesn't work. What works is when I switch to LXD:

sudo snap install lxd
sudo lxd init --auto
snapcraft --use-lxd
my flag
Resolved with friendly help at the snapcraft forum: https://forum.snapcraft.io/t/beginner-question-what-does-dump-do/27458/4
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.