← 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 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.

Suggested action:

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
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

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1590620 snapcraft can generage snaps with a name longer than 107 characters snapcraft (launchpad) open Snapcraft only limits the generated snap file name, not the snap name itself, so it can build snaps whose names exceed the store's 107-character limit and fail at upload. Open since 2016, no labels or comments, untriaged.
72%