charmcraft pack outputs different charm filenames depending on base/platform specification in charmcraft.yaml
Metadata
Current evaluation
Closed as working as intended. Maintainers clarified the deprecated bases syntax is retained for backward compatibility, while the newer platforms syntax intentionally allows user-configurable filenames via platform keys. No code changes were implemented.
Suggested action: —
No scores available.
Issue body
### Bug Description
depending on whether you use the `base:` or the `platforms:` syntax in charmcraft.yaml, charmcraft will either create a `foo-ubuntu@22.04.charm`, or a `foo-ubuntu-22.04.charm` file.
I believe the created files should have the same name regardless of the syntax that was used to specify them.
### To Reproduce
charmcraft pack in `https://github.com/canonical/parca-scrape-target-operator`
charmcraft pack in `https://github.com/canonical/parca-k8s-operator`
### Environment
candidate snap
### charmcraft.yaml
```yaml
n/a
```
### Relevant log output
```shell
n/a
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as working as intended. Maintainers clarified the deprecated bases syntax is retained for backward compatibility, while the newer platforms syntax intentionally allows user-configurable filenames via platform keys. No code changes were implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as working as intended. The filename difference stems from the deprecated bases syntax versus the new platforms syntax, which intentionally uses user-defined platform names to determine output filenames. No code changes planned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as working as intended. The discrepancy stems from deprecated bases syntax versus new platforms syntax, which intentionally uses user-defined names to determine output filenames. No code changes were made. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as working as intended. Inconsistent filenames stem from deprecated bases syntax versus new platforms syntax, which intentionally allows user-configurable output names. No code changes were made. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed as working as intended. The bases syntax is deprecated legacy, while platforms intentionally uses the user-defined platform key as the filename suffix. No code changes were made; users must adjust platform names to control output filenames. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1963 Clarify that each `platform` entry is a 1:1 mapping to output `charm` files | charmcraft | closed | Closed and resolved by updating the charmcraft.yaml schema documentation to clarify that each platform entry generates a separate charm file. |