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

Unable to set components version using craftctl set version #5102

Open
stephensp opened this issue Oct 8, 2024 · 4 comments
Open

Unable to set components version using craftctl set version #5102

stephensp opened this issue Oct 8, 2024 · 4 comments

Comments

@stephensp
Copy link
Contributor

What needs to get done

component versions need to be settable during override-build , just like a snap. Currently it fails with the following error

RuntimeError: 'override-build' in part 'nvidia-550-ko-comp' executed an invalid control API call: variable 'version' can be set only once.

Why it needs to get done

components need to be able to dynamically set their version based on revision numbers and other system settings. This is not possible if the version has to be hardcoded into the version field.

@sergiusens
Copy link
Collaborator

This is because the part is decoupled from the component, this would need to be a new craftctl command specific to the component that takes a component name and the desired version, or overload the current set version command to use a key=value (component=version) like syntax.

@sergiusens
Copy link
Collaborator

Of course, then adopt-info would need to be considered for each component

@cmatsuoka
Copy link
Contributor

Maybe craftctl set version(<component_name>)=<value>?

@mr-cal
Copy link
Collaborator

mr-cal commented Oct 8, 2024

Or @lengau's suggestion craftctl set comp1.version=<value>.

After discussing with @sergiusens and @cmatsuoka, this is unlikely to be completed this cycle. Claudio is going to discuss this proposal with Gustavo tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants