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

Product precedence check does not consider products to be activated #171

Open
josegomezr opened this issue May 8, 2023 · 2 comments
Open

Comments

@josegomezr
Copy link
Contributor

When activating a system from scratch, activating sle-module-containers/15.4/x86_64 raises with:

hydra:~ # suseconnect -r $REGCODE -p sles/15.4/x86_64 -p sle-module-basesystem/15.4/x86_64 -p sle-module-containers/15.4/x86_64
Registering system to SUSE Customer Center

Updating system details on https://scc.suse.com ...

Activating sle-module-containers 15.4 x86_64 ...
Error: Registration server returned 'The product you are attempting to activate (Containers Module 15 SP4 x86_64) requires one of these products to be activated first: Basesystem Module 15 SP4 x86_64' (422)

Which makes sense if I were activating sle-module-containers/15.4/x86_64 alone, but I'm also activating the requirement in the same command.

@djoreilly
Copy link
Collaborator

The Ruby version has the same behavior. And the doc says only one product can be specified at a time:
https://github.com/SUSE/connect-ng/blob/e3c41e60892eb6070625d85497f8783f836ef609/suseconnect/connectUsage.txt#L8C7-L9

It's possible to catch this at flag parse time and print a better message.

djoreilly added a commit to djoreilly/connect-ng that referenced this issue May 10, 2023
On registration and deregistration the product flag (-p/--product)
is only supposed to be used once. But this is not enforced and the
error message from the server is not clear about what the user did
wrong. This patch enforces the one product rule at flag parse time
and prints a better message.

SUSE#171
@digitaltom
Copy link
Member

Shall we rename this then to a feature request Support multiple -p parameters?

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

3 participants