`charmcraft pack` retains no longer existing files from previous packs
Metadata
Current evaluation
charmcraft pack includes files deleted from the working directory in the charm archive; clean fixes it. Triaged as a known bug, re-confirmed present in Oct 2024, upstream craft-parts bug filed, per-part clean workaround documented.
Suggested action: keep open
Reason: The issue is triaged (Status: Triaged, Type: Bug), explicitly confirmed as a known bug by maintainer facundobatista, and re-confirmed still present in Oct 2024 by lengau with an upstream report at canonical/craft-parts#851, which I verified is still open with a failing test awaiting implementation. The bug remains reproducible and relevant, so it should stay open until the craft-parts fix lands; the documented `charmcraft clean <part-name>` workaround mitigates but does not resolve it.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
45
Quick Win:
24.75
Staleness:
55
Complexity:
45
Confidence:
82
Support Request:
5
|
keep open | charmcraft pack includes files deleted from the working directory in the charm archive; clean fixes it. Triaged as a known bug, re-confirmed present in Oct 2024, upstream craft-parts bug filed, per-part clean workaround documented. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
65
Complexity:
45
Confidence:
85
Support Request:
10
|
keep open | charmcraft pack includes deleted files from previous builds. Triaged bug, confirmed by maintainers, with an upstream craft-parts issue and a workaround. Last activity ~10 months ago. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
50
Complexity:
40
Confidence:
95
Support Request:
5
|
keep open | charmcraft pack includes deleted files from previous builds. Triaged bug, confirmed active by maintainers, with an upstream fix tracked in craft-parts. Workaround available. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
65
Complexity:
45
Confidence:
85
Support Request:
10
|
keep open | charmcraft pack retains deleted files from previous builds. Triaged bug confirmed still present in latest versions, with an upstream issue linked and a workaround documented. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
25
Confidence:
90
Support Request:
0
|
keep open | charmcraft pack retains deleted files from previous builds in the output archive. Triaged bug confirmed still present in latest releases. Upstream issue filed in craft-parts. Workaround: run charmcraft clean <part-name> before repacking. |
Update history
No update history recorded yet.
Related work
-
Blocked By:
canonical/craft-parts#851
(confidence 85%)
lengau filed this upstream bug (removed files from local sources remain in the part) on 2024-09-20; it is still open, so the charmcraft-side fix depends on it.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #746 `charmcraft pack` for existing environment does not remove files that have been deleted | charmcraft | closed | Closed as a duplicate of issue #710. The charmcraft pack command was reported to retain deleted files in the charm archive across builds. Resolution and tracking are handled in the referenced duplicate issue. | |
| #552 `charmcraft pack` runs indefinitely when using parts | charmcraft | closed | The charmcraft pack hang was caused by a duplicate ignore patterns bug. This was fixed in Charmcraft 1.3.0. The author confirmed they would upgrade and close the issue pending recurrence. | |
| #1160 `charmcraft pack` does not recognize updated `charmcraft.yaml` file | charmcraft | open | charmcraft pack ignores updated build-snaps channel in charmcraft.yaml without a clean; tracked as a craft-parts bug (canonical/craft-parts#496, still open) awaiting a dependency patch release to pull into charmcraft. | |
| #501 charmcraft pack fails trying to include a non-existing charm/src/.tox/ | charmcraft | closed | charmcraft pack failed when copying non-existent build directories or files. Users worked around it with charmcraft clean. The issue was closed as fixed upstream in the underlying parts lifecycle code. | |
| #907 `charmcraft pack` does not handle updating a file's execution permissions without a `charmcraft clean` | charmcraft | open | charmcraft pack ignores local file permission changes (e.g., chmod +x on src/charm.py) until a full charmcraft clean, causing confusing lint errors. Maintainer reproduced and filed upstream craft-parts#311; still unfixed. | |
| #2273 charmcraft.yaml deleted while packing (working tree not clean) | charmcraft | open | charmcraft pack deletes charmcraft.yaml from the working tree, making git describe --dirty report -dirty on clean release builds. Reported with charmcraft 3.4.3, no maintainer response or labels in ~13 months. | |
| #1530 Changing charmcraft.yaml doesn't update the resulting charm's metadata.yaml | charmcraft | open | Bug: editing charmcraft.yaml then re-running `charmcraft pack` does not update the resulting charm's metadata.yaml. Filed by a maintainer (lengau); last comment (2024-09-09) says it's unclear if still reproducible. Related open craft-application#821 describes the same 'Already packed' skip behavior. | |
| #821 5.5.0 changes pack semantics if the project file has different metadata | craft-application | open | Charmcraft pack skips repacking when only charmcraft.yaml metadata (e.g. summary, config, platforms) changes, leaving a stale .charm. Triaged and moved to craft-application; workaround is clean. Conditional repacking support added in #1111. | |
| #514 `charmcraft build` silently omits files called out in `charmcraft.yaml` if executed from an external directory | charmcraft | closed | Fixed in PR #525. Resolved a bug where charmcraft build and pack silently omitted glob-patterned files when run externally. The fix corrects path misalignment between Charmcraft and the parts processor, ensuring proper glob expansion. | |
| #693 Charms packed using the reactive plugin shows dirty version | charmcraft | closed | Fixed by modifying the reactive plugin to stop removing charmcraft.yaml before building. This prevented git describe from incorrectly marking packed charm versions as dirty. |