← Back to issue list

Build does not include files or directories

View original Github issue

Metadata

Project
charmcraft
Number
#634
Type
issue
State
closed
Author
erik78se
Labels
Created
Updated
Closed

Current evaluation

Closed as not a bug. The reporter discovered that since charmcraft 1.2.0, files must be explicitly listed in the charmcraft.yaml prime section to be included in builds. Resolved by updating the configuration, not a code fix.

Suggested action:

No scores available.

Issue body

Sometimes when I build my charm: https://github.com/erik78se/juju-operators-examples/tree/main/metrics-nrpe The build ignores files or directories which I add. This happens to me for other charms aswell. The build goes all fine, but files and directories are ignored. I have sometimes been able to resolve that issue with purging the lxc container, but now id doesn't seem to help. I do charmcraft clean; charmcraft build But no avail. charmcraft 1.4.0 stable from snap Do I have to specify which files and directories to include now or what am I doing wrong? Its driving me nuts. In my filesystem now I have ``` erik@pixel:~/PycharmProjects/juju-operators-examples/metrics-nrpe > ls charmcraft.yaml CONTRIBUTING.md LICENSE metrics.yaml requirements-dev.txt run_tests tests checks files metadata.yaml README.md requirements.txt src ``` In the built charm I get: ``` ubuntu@juju-342e79-3:/var/lib/juju/agents/unit-metrics-nrpe-0/charm$ ls LICENSE README.md dispatch hooks manifest.yaml metadata.yaml metrics.yaml revision src venv ``` I have unzipped the built charm and I find that the files and directories are all missing.

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Closed as not a bug. The reporter discovered that since charmcraft 1.2.0, files must be explicitly listed in the charmcraft.yaml prime section to be included in builds. Resolved by updating the configuration, not a code fix.
qwen/qwen3.6-35b-a3b Closed as not a bug. The reporter discovered charmcraft 1.2.0+ requires explicit file inclusion via the prime directive in charmcraft.yaml. The issue was resolved by updating the configuration to match the new packing behavior.
qwen3.6-35b-a3b-mtp-q6 Closed as not a bug. The reporter discovered that since charmcraft 1.2.0, files must be explicitly listed in charmcraft.yaml under parts.charm.prime to be included in the build. Resolved by updating configuration.
qwen3.6-35b-a3b-mtp-q6 Closed as not a bug. Author determined charmcraft 1.2.0+ changed default behavior and no longer auto-includes files. Resolution required explicitly listing included paths in the prime field of charmcraft.yaml.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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%