← Back to issue list

"snapcraft try" using provider LXD generates a prime/ directory with no payload

View original Github issue

Metadata

Project
snapcraft
Number
#4219
Type
issue
State
closed
Author
ghost
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #4347 (89fb02a19): try now re-primes over an existing host-mounted prime directory, preventing an empty payload.

Resolution: closed resolved

Reason: An empty host mount could mask existing prime contents. PR #4347 was merged in commit 89fb02a19 to re-prime before trying, with the hotfix proposed for 7.5.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description Building a trivial snap on Ubuntu 22.04 with snapcraft 7.4.3 and provider LXD with "snapcraft try", the eventual prime/ directory contains nothing but: $ tree prime prime └── meta ├── gui └── snap.yaml $ This appears to be entirely reproducible for me. ### To Reproduce Pick a random snap and run "snapcraft try" using LXD provider -- the output suggests you can now run "snap try prime", but given that there is no meaningful payload, you get: error: cannot try /home/rpjday/sc101v23/snapcraft-101-labs/basic-snap/prime: snap is unusable due to missing files; contact developer ### Environment Ubuntu 22.04, snapcraft 7.4.3. ### snapcraft.yaml ```shell name: basic-snap base: core22 # the base snap is the execution environment for this snap version: '0.99' summary: Demo snap to show basic snap features. description: | Snap to demo numerous basic snap properties and operations. grade: devel confinement: devmode apps: basic-snap: command: basic.sh hello: command: hello.sh hi: command: d1/d2/hi.sh parts: basic: source: src1/ plugin: dump hello: source: src2/ plugin: dump hi: source: src3/ plugin: dump ``` ### Relevant log output ```shell $ snap try prime error: cannot try /home/rpjday/sc101v23/snapcraft-101-labs/basic-snap/prime: snap is unusable due to missing files; contact developer ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #4347 (89fb02a19): try now re-primes over an existing host-mounted prime directory, preventing an empty payload.
stealth/space-bunny-alpha — closed resolved Fixed in merged PR #4347: snapcraft try now re-primes over an existing host-mounted prime directory, preventing an empty payload when prime already exists.
qwen/qwen3.6-35b-a3b — — snapcraft try overwrote an existing host-mounted prime directory, bypassing lifecycle repriming. A workaround was provided, and the bug was fixed via hotfix PR #4347 for version 7.5.
qwen/qwen3.6-35b-a3b — — A directory mounting conflict caused an empty prime directory when running snapcraft try after an initial build. The issue was fixed via hotfix PR #4347 for version 7.5.
qwen/qwen3.6-35b-a3b — — Running snapcraft try with LXD after a prior build overwrote the prime directory with an empty host mount, leaving no payload. The bug was fixed and merged as PR #4347 as a hotfix for snapcraft 7.5.
qwen3.6-35b-a3b-mtp-q6 — — Fixed via hotfix PR #4347 targeting v7.5. Running snapcraft try with LXD overwrote the host-mounted prime directory with an empty mount, blocking repriming. The patch resolves the mount conflict to ensure payload files are correctly generated.

Update history

No update history recorded yet.

Related work

Related issues

No related issues found above the similarity threshold.