openSUSE / openSUSE/libsolv

A "worse" choice is picked when resolving transaction

Open
#474 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
609
Forks
177
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the listed yolo and SELinux package scenario through libsolv's transaction-resolution entry points, then review how protected packages and configuration files are handled. Done means establishing whether a configuration-based preference for selinux-policy-targeted is supported without affecting users of selinux-policy-mls, and documenting or implementing the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.