Bug: stage-packages re-downloaded on every run due to python-apt _file_is_same() bug
Metadata
Current evaluation
Valid, triaged performance bug: python-apt's _file_is_same() order-sensitive hash compare makes apt_cache.fetch_archives() re-download stage-packages despite a warm deb cache. Maintainer gcomneno drafted fix PR #1553 (open, unreviewed); not yet fixed in craft-parts main.
Suggested action: keep open
Reason: Root cause is well-evidenced and external to craft-parts: the report cites python-apt sources and Debian bug 1130691, and gcomneno confirmed 'the report seems solid: the repeated downloads appear to come from python-apt's cache-hit check rather than from craft-parts intentionally bypassing its own download cache.' I verified craft_parts/packages/apt_cache.py still calls candidate.fetch_binary() with no local hash/cache guard, and no commit in apt_cache.py's history addresses this, so the bug remains present; the issue is triaged (maintainer scoping discussion + draft PR #1553), so it should stay open pending merge/review of that PR rather than being closed.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
52
Quick Win:
24
Complexity:
42
Confidence:
84
Actionability:
80
|
keep open | Valid, triaged performance bug: python-apt's _file_is_same() order-sensitive hash compare makes apt_cache.fetch_archives() re-download stage-packages despite a warm deb cache. Maintainer gcomneno drafted fix PR #1553 (open, unreviewed); not yet fixed in craft-parts main. | |
| stealth/space-bunny-alpha |
Impact:
60
Quick Win:
32
Complexity:
38
Confidence:
82
Actionability:
85
|
keep open | python-apt _file_is_same() always returns False, so AptCache.fetch_archives re-downloads every stage-package despite a warm deb cache. Root cause pinpointed; draft PR #1553 proposes a monkey-patch workaround, not yet merged. | |
| qwen/qwen3.6-35b-a3b |
Impact:
85
Quick Win:
47
Complexity:
35
Confidence:
85
Actionability:
85
|
keep open | python-apt _file_is_same() bug causes craft-parts to re-download all stage-packages on every run. PR #1553 is open addressing this with a monkey-patch workaround. | |
| qwen/qwen3.8-27b |
Impact:
55
Quick Win:
30
Staleness:
45
Complexity:
45
Confidence:
85
Support Request:
5
|
keep open | stage-packages .debs are re-downloaded on every run because python-apt's _file_is_same() compares hash lists order-sensitively. Maintainer confirmed the analysis; draft PR #1553 with a local craft-parts mitigation is pending, and the bug is still unfixed in the code. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
45
Complexity:
40
Confidence:
90
Support Request:
5
|
keep open | Valid bug report detailing unnecessary .deb re-downloads caused by a python-apt hash comparison flaw. Maintainer has analyzed the scope and opened a draft PR (#1553) to implement a local mitigation. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
25
Confidence:
85
Support Request:
5
|
keep open | craft-parts re-downloads stage-packages on every run due to a python-apt hash comparison bug. Maintainer acknowledged and linked a draft PR (#1553) for a narrow workaround. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-parts#1553
(confidence 85%)
Open draft PR by gcomneno: 'fix(deb): avoid re-downloading cached stage-packages', monkey-patching apt.package._file_is_same (binary mode + order-independent hash compare) around candidate.fetch_binary in AptCache.fetch_archives; +90/-5, 2 files, no reviewers yet.
-
Related To:
canonical/craft-parts#1485
(confidence 80%)
Merged as a98be83a, but gcomneno clarified it 'reduces some python-apt usage in the installed-package check path' and does not address the stage-packages re-download/cache-hit problem.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1553 fix(deb): avoid re-downloading cached stage-packages | craft-parts | open | External-contributor PR adding a narrow monkey-patch of apt.package._file_is_same (binary mode, order-independent hash compare) around candidate.fetch_binary in AptCache.fetch_archives, so warm-cache .deb files count as cache hits. +90/-5, 2 files, no reviewers yet. |