← Back to issue list

charmcraft pack outputs different charm filenames depending on base/platform specification in charmcraft.yaml

View original Github issue

Metadata

Project
charmcraft
Number
#2174
Type
issue
State
closed
Author
PietroPasotti
Labels
—
Created
Updated
Closed

Current evaluation

Closed as working as intended: deprecated bases preserve Charmcraft 2.x naming, while platforms keys intentionally control the filename suffix.

Resolution: closed not a bug

Reason: Maintainer lengau explained on 2025-03-12 that legacy bases retain historical 2.x output naming, whereas platforms suffixes are deliberately user-configurable through the platform key. No code change or resolving PR was cited.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed not a bug Closed as working as intended: deprecated bases preserve Charmcraft 2.x naming, while platforms keys intentionally control the filename suffix.
stealth/space-bunny-alpha — closed not a bug Closed as working as intended: deprecated bases retain 2.x naming, while platforms allow user-configurable filenames through their keys. No code fix was made.
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.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#494 Add `output-file` to charmcraft.yaml so the developer can control the resulting file name charmcraft closed No output-file key was added. Charmcraft 3 named platforms provide shorter, developer-controlled filenames; maintainers closed #494 in 2025 as unlikely to proceed further.
71%
#383 commands/build: charm file name format support for bases (CRAFT-66) charmcraft merged Merged PR #383 (commit 951f6aaa; merge 1c839909) added bases-aware charm filename formatting and tests, retaining the legacy runtime path pending default-bases configuration.
71%