← Back to issue list

trying to sign-build without keys leaves a -build file, empty

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1629984
Type
issue
State
closed
Author
~elopio
Labels
store
Created
Updated
Closed

Current evaluation

Merged canonical/snapcraft PR #848 (d0b49816f), fixing failed sign-build runs that left empty "-build" files by selecting a key before writing output.

Resolution: closed resolved

Reason: Canonical/snapcraft PR #848 was merged as commit d0b49816f. It made sign-build prompt for key selection and avoid leaving stray or empty "-build" files when signing fails.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged canonical/snapcraft PR #848 (d0b49816f), fixing failed sign-build runs that left empty "-build" files by selecting a key before writing output.
stealth/space-bunny-alpha — closed resolved Merged PR snapcore/snapcraft#848 (d0b49816f) fixed the no-key failure that left an empty -build file.
stealth/space-bunny-alpha — closed resolved Merged PR #848 (d0b49816f) fixed sign-build by prompting for key selection and preventing stray or empty “-build” files.
stealth/space-bunny-alpha — closed stale Closed without a documented fix; no linked PR or resolving commit was found for the empty -build file left after a failed sign-build.
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

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#848 (confidence 100%)

    The merged fix explicitly references LP #1629984 and landed as commit d0b49816f.

  • Related To: snapcraft (launchpad)#1629966 (confidence 95%)

    The resolving PR also fixed the closely related key-selection issue.

Related issues

Issue Project State Summary Similarity
#848 `sign-build` to prompt users for key selection snapcraft merged Merged PR #848 (commit d0b49816f) made sign-build prompt for key selection and avoid stray/empty '-build' files, fixing LP #1629966 and #1629984.
73%
#5618 sign-build --local just doesn't work snapcraft closed Fixed by merged PR #5826 (commit bf00a385e, "fix: parse a snap file for the sign-build command"), which declared the missing snap-file argument in the legacy sign-build command; tracked internally as SNAPCRAFT-1180.
70%