cannot create components with digits in the name
Metadata
Current evaluation
Bug confirmed: component names rejected digits, though snapd allows them. Fixed by PR canonical/snapcraft#4945 (commit 8ab7fd0c8) sharing one validator for snap and component names, after upstream craft-parts#790 (b2128938).
Resolution: closed resolved
Reason: Maintainer acknowledged the over-restrictive validation and split the work into craft-parts (PR #790, commit b2128938) and snapcraft (PR #4945, commit 8ab7fd0c8), both merged, unblocking CRAFT-3043 and closing LP#2069783.
Evaluated by: mr-cal-bot
No scores available.
Issue body
snapcraft.yaml with this content:
name: abeato-snap-with-comps
version: 1.0
summary: Snap with components
description: A snap that defines components
base: core24
confinement: strict
components:
comp1:
type: test
produces error:
$ snapcraft
Bad snapcraft.yaml content:
- Component names can only use ASCII lowercase letters and hyphens (in field 'components')
while it is a valid name for snapd (validation is the same as for snap names).
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Bug confirmed: component names rejected digits, though snapd allows them. Fixed by PR canonical/snapcraft#4945 (commit 8ab7fd0c8) sharing one validator for snap and component names, after upstream craft-parts#790 (b2128938). | |
| stealth/space-bunny-alpha | — | closed resolved | Allowed digits in component names by aligning Snapcraft validation with snap-name and craft-parts partition rules; fixed through craft-parts #790 and Snapcraft #4945. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by #4945 (commit 8ab7fd0c8), allowing numbers in component names so names like comp1 are accepted. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The validation rule restricting component names to lowercase letters and hyphens remains unchanged, as no discussion or fix was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The validation mismatch between snapcraft and snapd regarding digits in component names remains unfixed. Closed without resolution or follow-up comments. |
Update history
| Date | Change |
|---|---|
| created | |
| closed | |
| closed | |
| closed | |
| closed | |
| closed | |
| closed | |
| closed | |
| closed | |
| closed | |
| closed | |
| closed |
Related work
-
Likely Fixed By:
canonical/snapcraft#4945
(confidence 98%)
Merged PR allowing numbers in component names; cited in the final issue comment.
-
Blocked By:
canonical/craft-parts#790
(confidence 95%)
Upstream craft-parts PR relaxing partition/namespace validation to permit digits, merged first as a dependency.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4538 Validate component names do not begin with `snap-` | snapcraft | closed | Merged PR #4566 added validation rejecting snapcraft.yaml component names beginning with the snapd-reserved prefix "snap-". | |
| #4945 feat: allow numbers in component names | snapcraft | merged | Merged PR #4945 (commit 8ab7fd0c8) permits digits in component names and shares one validator between snap and component names, fixing LP#2069783. Depends on craft-parts#790. | |
| #4566 feat(projects): validate component names do not begin with 'snap-' | snapcraft | merged | Merged PR #4566 to reject component names beginning with the snapd-reserved "snap-" prefix, fixing #4538; #4567 and #4568 addressed unrelated CI failures. |