trying to sign-build without keys leaves a -build file, empty
Metadata
Current evaluation
Closed and resolved. The snapcraft sign-build command was patched to prevent creating empty -build files on failure, resolving subsequent assertion conflicts. No further discussion was recorded.
Suggested action: —
No scores available.
Issue body
I tried to sign-build, but I had not created the keys. This throws an error, but leaves behind a -build empty file. So after I created the keys I tried to sign again and it kept saying that "A signed build assertion for this snap already exists."
If the sign fails, no -build file should be created.
To reproduce:
$ rm *-build
$ rm -rf ~/.snap/gnupg
$ snapcraft sign-build *.snap
$ cat *-build
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed and resolved. The snapcraft sign-build command was patched to prevent creating empty -build files on failure, resolving subsequent assertion conflicts. No further discussion was recorded. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Failing snapcraft sign-build commands left empty -build files, blocking subsequent runs. Fixed by ensuring no build artifacts are created when signing fails, preventing assertion conflicts. | |
| qwen/qwen3.6-35b-a3b | — | — | Issue closed. The bug causing snapcraft sign-build to leave an empty -build file on failure was fixed by preventing file creation during failed signing, eliminating subsequent assertion conflicts. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed: snapcraft sign-build no longer leaves empty -build files on failure, preventing subsequent assertion errors. The issue was closed after the behavior was corrected. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1628679 Implement 'sign-build' command | snapcraft (launchpad) | closed | Requesting a snapcraft sign-build command to create and push assertions was closed without implementation. No pull request was linked, indicating the feature was abandoned. | |
| #831 'sign-build' implementation. | snapcraft | merged | Merged the snapcraft sign-build command for generating, signing, and pushing assertions. Supersedes PR 795. Lint errors were fixed and design concerns regarding future release integration were resolved with reviewer approval. | |
| #1636979 snapcraft validate and sign-build are inconsistent when there are multiple keys | snapcraft (launchpad) | open | snapcraft validate uses the default signing key while sign-build shows a key-selection wizard when multiple keys exist; the two commands should behave consistently. Open since 2016, zero comments, no maintainer response. |