← Back to issue list

charmcraft pack fails trying to include a non-existing charm/src/.tox/

View original Github issue

Metadata

Project
charmcraft
Number
#501
Type
issue
State
closed
Author
sed-i
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

No scores available.

Issue body

My worktree does not have an `src/.tox` subfolder. Log attached. After running pack again, it worked fine. [charmcraft.log](https://github.com/canonical/charmcraft/files/7022238/charmcraft.log)

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 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.
qwen/qwen3.6-35b-a3b charmcraft pack failed when packaging deleted directories like .tox or .git. Users worked around it with charmcraft clean. The issue was closed after the underlying lifecycle bug was resolved upstream in craft-parts.
qwen/qwen3.6-35b-a3b charmcraft pack failed copying non-existent directories from prior builds. Users worked around it with charmcraft clean or .jujuignore. The issue was closed after being fixed upstream in the underlying build system.
qwen3.6-35b-a3b-mtp-q6 charmcraft pack fails copying non-existent directories from prior builds. Users work around it with charmcraft clean. The defect stems from an upstream craft-parts lifecycle bug. Closed as the issue has been fixed upstream.
qwen3.6-35b-a3b-mtp-q6 charmcraft pack fails when copying deleted build artifacts. Resolved by fixing the craft-parts lifecycle upstream. Workaround involves running charmcraft clean. Closed as fixed.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#710 `charmcraft pack` retains no longer existing files from previous packs charmcraft 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.
77%
#640 Unable to build charm due to "no such file or directory" charmcraft closed Closed as not reproducible. Maintainers could not replicate the charmcraft packaging failure involving a missing .tox log file. The reporter resolved it locally by adding the directory to .jujuignore, but no root cause was identified or patched.
77%
#1104 charmcraft pack on Ubuntu 23.04 (Lunar) fails. charmcraft closed Charmcraft pack failed on Ubuntu 23.04 due to unavailable build environments. PR #1130 addressed the issue but was blocked by an external cloud-images bug. The issue was closed pending upstream resolution.
75%
#1747 Failed to run the build script for part 'charm' charmcraft closed Build script failure during charmcraft pack was resolved. The issue was closed after the maintainer acknowledged the report and merged the fix in PR #1751.
75%
#497 charmcraft Pack is not Working charmcraft closed Resolved via user environment fix. The permission error stemmed from running charmcraft as root with root-owned files. Switching to a regular user, adding them to the lxd group, and correcting ownership allowed pack to succeed. No code changes required.
74%
#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.
73%
#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.
72%
#646 Failed to inject host Charmcraft snap into target environment charmcraft closed Closed. Maintainer confirmed the issue is resolved in recent Charmcraft versions and cannot be reproduced. A user workaround suggested running charmcraft clean --verbose prior to building.
72%