Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support package names shorter than 3 characters #119

Closed
rebornplusplus opened this issue Feb 5, 2024 · 2 comments · Fixed by #120
Closed

Support package names shorter than 3 characters #119

rebornplusplus opened this issue Feb 5, 2024 · 2 comments · Fixed by #120
Assignees
Labels
good first issue Good for newcomers

Comments

@rebornplusplus
Copy link
Member

rebornplusplus commented Feb 5, 2024

Chisel does not currently support package names shorter than 3 characters. This is controlled by a few regular expressions specified in the setup package.

var fnameExp = regexp.MustCompile(`^([a-z0-9](?:-?[.a-z0-9+]){2,})\.yaml$`)
var snameExp = regexp.MustCompile(`^([a-z](?:-?[a-z0-9]){2,})$`)
var knameExp = regexp.MustCompile(`^([a-z0-9](?:-?[.a-z0-9+]){2,})_([a-z](?:-?[a-z0-9]){2,})$`)

However, this means that packages like jq are not currently supported. Per the debian policy, the minimum length of a package's name can be 2.

Package names (both source and binary, see Package) must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.

Related: canonical/chisel-releases#116

@cjdcordeiro
Copy link
Collaborator

unless you see an obvious rationale for keeping that limitation, I'd propose simply putting a PR up for adjusting that limit (unless it's not straightforward)

@rebornplusplus
Copy link
Member Author

Yeah, this should be a very easy fix. I will add a PR for it shortly. I wanted to add the "Good first issue" label to this issue in case anyone wanted to try it out, but I can't. 😕

@rebornplusplus rebornplusplus self-assigned this Feb 6, 2024
@cjdcordeiro cjdcordeiro added the good first issue Good for newcomers label Feb 6, 2024
rebornplusplus added a commit to rebornplusplus/chisel that referenced this issue Feb 8, 2024
This commit adds support for package names with a minimum length of two.
Previously chisel only supported a minimum length of 3. The limit on the
slice name is kept unchanged.

Fixes canonical#119.
rebornplusplus added a commit to rebornplusplus/chisel that referenced this issue Feb 8, 2024
This commit adds support for package names with a minimum length of two.
Previously chisel only supported a minimum length of 3. The limit on the
slice name is kept unchanged.

Fixes canonical#119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants