← Back to issue list

snapcraft builds a snap that won't install if + is in the name

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1693798
Type
issue
State
closed
Author
~bromer
Labels
bitesize
Created
Updated
Closed

Current evaluation

Fixed by merged snapcore/snapcraft#1622 (commit 066d6e757), which synchronized snap-name validation with snapd and rejected '+' in snap names.

Resolution: closed resolved

Reason: PR #1622 was merged as commit 066d6e757. It updated schema validation to match snapd, preventing creation of snaps with invalid names containing '+'.

Evaluated by: mr-cal-bot

No scores available.

Issue body

If you build a snap with plus (+) in the snap name, the resulting snap file cannot be installed. $ snapcraft init Created snap/snapcraft.yaml. 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_0.1_amd64.snap Try to install it. $ snap install --dangerous snap+bug_0.1_amd64.snap error: cannot read snap file: invalid snap name: "snap+bug"

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged snapcore/snapcraft#1622 (commit 066d6e757), which synchronized snap-name validation with snapd and rejected '+' in snap names.
stealth/space-bunny-alpha — closed resolved Fixed by merging canonical/snapcraft#1622 (commit 066d6e757), synchronizing name validation with snapd and rejecting '+' in snap names.
stealth/space-bunny-alpha — closed resolved Fixed by validating snap names during builds, rejecting invalid characters such as + instead of producing uninstalleable snaps.
qwen/qwen3.6-35b-a3b — — Fixed by enforcing strict snap name validation during the build process. Snapcraft now rejects names containing invalid characters like plus signs, preventing the generation of uninstalleable packages.
qwen/qwen3.6-35b-a3b — — Reported that snapcraft allows building snaps with '+' in the name, causing installation to fail. Closed without comments after nearly nine years, likely abandoned or resolved by enforcing strict snap name validation.
qwen/qwen3.6-35b-a3b — — Abandoned and closed without resolution. Snapcraft continues to allow plus signs in snap names during build, causing installation failures.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. Abandoned. No fix was implemented, leaving the snap name validation gap unaddressed.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#1622 (confidence 99%)

    The merged schema-validation change directly addressed the reported invalid '+' name.

Related issues

Issue Project State Summary Similarity
#1720230 snapcraft fails in a directory with spaces snapcraft (launchpad) closed Fixed directory names with spaces by quoting environment-variable values in project_loader; merged as snapcore/snapcraft#1578 (commit d154224d7).
70%
#1589613 Snap app names are too permissive snapcraft (launchpad) closed Fixed: snapcraft PR #555 (commit bc9fac7e7) tightened snap/app name validation to match snapd, with snapd PR snapcore/snapd#1280; shipped in snapcraft 2.12 (xenial/yakkety) and verified.
70%