snapcraft pull doesn't save the installed build dependencies
Metadata
Current evaluation
Fixed in merged PR #1299 (95d737dc3); PR #1340 later expanded recording to all build packages globally.
Resolution: closed resolved
Reason: The issue was resolved by merged PR #1299, commit 95d737dc3, which corrected build-dependency recording. PR #1340, commit 51401fc07, subsequently extended this to record all build packages globally.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Snapcraft should save the name and versions of all the packages installed, so the package can be audited and recreated. Currently, it saves the stage package dependencies, but not the build package dependencies.
To reproduce:
Write a snapcraft.yaml with the following part:
parts:
my-part:
plugin: nil
build-packages: [hello]
stage-packages: [hello]
hello has one dependency on gcc-6-base.
Run snapcraft pull
Check the file parts/my-part/state/pull:
!PullState
assets:
build-packages: [hello=2.10-1]
source-details: null
stage-packages: [gcc-6-base=6.0.1-0ubuntu1, hello=2.10-1]
project_options: {deb_arch: amd64}
properties:
plugin: nil
source: .
source-branch: ''
source-commit: ''
source-depth: 0
source-subdir: ''
source-tag: ''
source-type: ''
stage-packages: [hello]
schema_properties: []
Note that the gcc-6-base dependency was only added to the stage-packages.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed in merged PR #1299 (95d737dc3); PR #1340 later expanded recording to all build packages globally. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed build-dependency recording by merged PR #1299 (95d737dc3), with PR #1340 (51401fc07) subsequently recording all build packages globally. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without comments or resolution. The bug where snapcraft pull omitted build package dependencies from the pull state file was abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without explicit resolution. The bug where snapcraft pull omitted build package dependencies from the state file was likely abandoned or superseded by later updates. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcraft#1299
(confidence 99%)
Merged PR identified as the fix for build-dependency recording, via commit 95d737dc3.
-
Related To:
snapcraft#1340
(confidence 98%)
Follow-up PR that expanded recording to all build packages globally, via commit 51401fc07.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1691580 snapcraft fails when specifying virtual build packages | snapcraft (launchpad) | closed | Resolved by merged PR #1323 (commit 0c9990ac0), which searches APT for a package providing a declared virtual build package. | |
| #1583718 snapcraft command doesn't include expected changes | snapcraft (launchpad) | closed | Local source edits now trigger refreshed pull/build steps, fixing stale packaged files; snapcraft#2167 was merged in commit 39c4c39f1. | |
| #1566 recording: record build-snaps installed during the pull | snapcraft | merged | Merged as e1d74020b, recording build-snaps installed during the pull and implementing canonical/snapcraft#1556. | |
| #1295 recording: record build packages installed in the snap | snapcraft | merged | Merged PR #1295 as commit 9a475ba5d, adding recording of build packages installed in the snap. | |
| #1606346 snapcraft-parser without git installed throw bad error | snapcraft (launchpad) | closed | Fixed in an already merged PR: missing dependencies now produce a clear error listing required commands, including git. |