← Back to issue list

Charm with weird platform name breaks

View original Github issue

Metadata

Project
craft-platforms
Number
#116
Type
issue
State
closed
Author
lengau
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Fixed by PR #194 (commit 39fafcc): platform parsing now accepts colon-containing names such as "0:" when no base prefix is present.

Resolution: closed resolved

Reason: PR #194 was merged as commit 39fafcc. Parsing now treats text before a colon as a base only when it contains "@", preserving names such as "0:" instead of parsing "0" as an invalid base.

Evaluated by: mr-cal-bot

No scores available.

Issue body

A charm with: ```yaml base: ubuntu@24.04 platforms: "0:": build-on: [amd64] build-for: [amd64] ``` Raises `ValueError: Invalid base string '0'. Format should be '<distribution>@<series>'`. First discovered at https://github.com/canonical/craft-platforms/actions/runs/14137328500/job/39612051861?pr=83#step:6:205

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by PR #194 (commit 39fafcc): platform parsing now accepts colon-containing names such as "0:" when no base prefix is present.
qwen/qwen3.6-35b-a3b — closed resolved Fixed platform name parsing to allow colons in names without a base prefix (e.g., "0:") by updating parse_base_and_name() to require "@" in the prefix. Merged in #194.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/craft-platforms#194 (confidence 100%)

    The merged fix changed parse_base_and_name() to support colons in unprefixed platform names.

Related issues

Issue Project State Summary Similarity
#194 fix(charm): allow colons in platform names without base prefix craft-platforms merged Merged PR #194 (commit 39fafcc) fixed charm platform parsing: parse_base_and_name() now only treats a prefix before ':' as a base when it contains '@', so names like '0:' no longer raise ValueError. Closes issue #116.
87%