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
Address incompatible profiles and software selections. #118
Conversation
|
I managed to test the changes, they look good. But, there is an issue when you select CIS profile, for example, then it will say the installation cannot proceed because of the I'm not sure if this problem was introduced by this PR of if it's there already. I'll investigate a bit more. |
|
Good catch. When I check the code, it doesn't seem that it has a way how to "forget" an old profile when you select a new one. I look forward to your analysis, and I predict that the problem already was there, and that it can be fixed, maybe even in this PR. |
|
As we predicted. The problem was already there. If I select a profile which tries to remove this package and then using Note: If you select first the Software Selection Server With GUI, then play around with profiles... it will allow the installation... but it might break in the middle. I guess the validation of packages is done when you enter/exit the respective |
|
So by investigating further, there actually is some kind of "undo", but it may not be working properly. I have verified that this code is executed when one switches a profile: https://github.com/OpenSCAP/oscap-anaconda-addon/blob/rhel8-branch/org_fedora_oscap/rule_handling.py#L683 |
This may indicate that the problem is on Anaconda side then. Additional info: |
|
So it's probably indeed an Anaconda issue. I did following steps:
|
This change introduces a mechanism that allows to vet packages marked for removal. Such package can now have a record in the ESSENTIAL_PACKAGES dict, that define whether the package is essential => cant be removed based on the environment and groups selected in the Software Selection Anaconda spoke. In case when one first selects the profile and then changes the Software Selection to an incompatible setting, the Selection spoke will raise an error, as it already tries to apply the blacklist with its environment/groups.
A new message has been introduced for cases when a profile would break the installation.
|
The inspection completed: 1 updated code elements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the issue with software dependency is on the Anaconda side, I approve this pull request.
|
@matejak Do you plan to make any other change to this PR? |
|
No, you can go ahead and merge it. |
This change introduces a mechanism that allows to vet packages marked for removal.
Such package can now have a record in the
ESSENTIAL_PACKAGESdict (yuck, but it works), that define whether the package is essential => can't be removed based on the environment and groups selected in the Software Selection Anaconda spoke.In RHEL8, one can't just remove e.g. xorg-common, as the system will even refuse to install.
In case when one first selects the profile and then changes the Software Selection to an incompatible setting, the Selection spoke will raise an error, as it already tries to apply the blacklist with its environment/groups.
How have I tested this change: