snapcraft builds a snap that won't install if + is in the name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
Medium
|
Kyle Fazzari |
Bug Description
If you build a snap with plus (+) in the snap name, the resulting snap file cannot be installed.
$ snapcraft init
Created snap/snapcraft.
Edit the file to your liking or run `snapcraft` to get started
$ cd snap/
$ ls
snapcraft.yaml
$ vi snapcraft.yaml
Change the name of the snap to something with a plus.
$ cat snapcraft.yaml
name: snap+bug # you probably want to 'snapcraft register <name>'
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
$ snapcraft
Preparing to pull my-part
Pulling my-part
Preparing to build my-part
Building my-part
Staging my-part
Priming my-part
Snapping 'snap+bug' |
Snapped snap+bug_
Try to install it.
$ snap install --dangerous snap+bug_
error: cannot read snap file: invalid snap name: "snap+bug"
Changed in snapcraft: | |
status: | Confirmed → Triaged |
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
milestone: | none → 2.35 |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
schema/ snapcraft. yaml currently allows + in the pattern for the "name" property. This should be removed from the regular expression.