rockcraft needs to update apt sources before installing build-packages
Metadata
Current evaluation
Rockcraft fails to install build-packages (e.g. openjdk-25-jdk-headless) because craft-parts marks packages before refreshing the apt cache. Maintainers triaged it as an upstream craft-parts bug; fix merged in craft-parts#1468, now awaiting dependency bump/release.
Suggested action: keep open
Reason: Maintainers actively triaged this (gcomneno, 2026-02-22 and 2026-03-31) and identified the root cause as upstream craft-parts: Ubuntu.install_packages() marked packages before apt-get update, causing BuildPackageNotFound on stale caches. The fix was merged in canonical/craft-parts#1468 (commit c2836c97), and rockcraft already depends on craft-parts>=2.35.0, so the issue should stay open until the fixed craft-parts release is confirmed in a rockcraft release and the reporter verifies.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
55
Quick Win:
38.5
Staleness:
25
Complexity:
30
Confidence:
80
Support Request:
5
|
keep open | Rockcraft fails to install build-packages (e.g. openjdk-25-jdk-headless) because craft-parts marks packages before refreshing the apt cache. Maintainers triaged it as an upstream craft-parts bug; fix merged in craft-parts#1468, now awaiting dependency bump/release. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
45
Complexity:
20
Confidence:
90
Support Request:
10
|
keep open | Rockcraft fails to find build-packages due to missing apt update before installation. Maintainers identified it as an upstream craft-parts bug with a proposed fix. Currently awaiting upstream resolution. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
30
Confidence:
85
Support Request:
5
|
keep open | Rockcraft fails to install build-packages due to stale apt cache. Maintainers identified it as an upstream craft-parts bug with a proposed fix. Currently awaiting upstream resolution or cross-repo linking. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
60
Confidence:
85
Support Request:
10
|
keep open | Rockcraft build fails due to stale apt cache when installing build-packages. Maintainers identified this as an upstream craft-parts issue with a proposed fix. Awaiting upstream resolution. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
50
Complexity:
20
Confidence:
85
Support Request:
5
|
keep open | Rockcraft fails to install build-packages due to stale apt caches, as sources are not updated before package resolution. Identified as an upstream craft-parts bug. A fix is proposed in craft-parts#1468 and awaits upstream review. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-parts#1468
(confidence 85%)
Merged PR 'fix(deb): refresh apt cache before marking packages' directly addresses the stale-cache BuildPackageNotFound reported here; rockcraft pins craft-parts>=2.35.0.
-
Related To:
canonical/craft-parts#292
(confidence 75%)
Upstream craft-parts issue about auto-populating apt-cache when empty, closed as fixed by PR #1468; same stale-cache failure mode.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #28 Stage-packages fails at unpack_stage_packages when installing some packages | rockcraft | closed | Fixed by integrating craft-parts PR #215. The unpack_stage_packages ValueError during rockcraft pack when installing packages like ca-certificates is resolved. | |
| #812 rockcraft insists on rebuilding part that has not changed | rockcraft | open | Rockcraft rebuilds the mariadb part when the unrelated scripts part changes, despite no dependency between them. Reported 565 days ago with no maintainer response, labels, or activity; the rebuild logic lives in craft-parts, not rockcraft. |