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

A "worse" choice is picked when resolving transaction #474

Open
vmojzis opened this issue Sep 13, 2021 · 1 comment
Open

A "worse" choice is picked when resolving transaction #474

vmojzis opened this issue Sep 13, 2021 · 1 comment

Comments

@vmojzis
Copy link

vmojzis commented Sep 13, 2021

Hi, I've encountered a situation where a transaction can be resolved in two ways and libsolv picks the one that is in some sense worse.
I understand that both are valid, but is there something that could be done to prefer the other choice without breaking other use cases?

The situation is following:

  • yolo requires (yolo-selinux if selinux-policy-targeted)
  • selinux-policy requires selinux-policy-base
  • selinux-policy-base is provided by selinux-policy-targeted and selinux-policy-mls
  • selinux-policy is a protected package

Installed packages:

  • selinux-policy
  • selinux-policy-targeted
  • selinux-policy-mls
  • yolo
  • yolo-selinux

When removing yolo-selinux, there are two options how to resolve it:

  1. remove yolo and yolo-selinux
  2. remove yolo-selinux and selinux-policy-targeted

From the user perspective, the first option is preferred, because yolo is designed to work with yolo-selinux and removing selinux-policy-targeted disables SELinux. However libsolv chooses the second option. We cannot mark selinux-policy-targeted as protected, because a small number of users use selinux-policy-mls instead. Is there a way to let libsolv know that selinux-policy-targeted should be treated as protected based on a configuration file?

@mlschroe
Copy link
Member

I don't think there's currently a way to make libsolv choose yolo over selinux-policy-targeted. Libsolv should IMHO take the weak dependencies into consideration when deciding which package to remove in "allowuninstall" mode, but it currently just uses the first problem package. See solver_autouninstall in problems.c for the gory details.

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

2 participants