core: Use SOLVER_FAVOR in relaxed mode#2059
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlebon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Requires: #2058 |
|
The feel I'm going for here is to match the UX from
That said, I think overall this matches what |
|
A real example of what this fixes here: coreos/coreos-installer#222. |
|
OK, rebased this now and added a test! But there's an unrelated regression in libdnf: rpm-software-management/libdnf#946 (should be an easy review!). |
|
OK, this is ready to go now! |
Hmm, weird. Not sure why it's not seeing it even though it seems like it is checking out and building the right version of libdnf. Prow for example compiles it fine. |
|
Maybe |
cgwalters
left a comment
There was a problem hiding this comment.
LGTM, I'm in favor of this.
|
/hold |
|
Still no idea what's going on with this, but you're right it's related to our old friend |
This closes the loop on the "developer experience" when composing with lockfiles. We want to remain flexible and allow adding/removing packages from the manifest without editing lockfiles. But we still want libsolv to give preference to lockfile packages when evaluating alternatives. For example, if the manifest has a request for a `foobar` Provides which both `foo` and `bar` provide and `foo` is in the lockfile, but not `bar`, we want libsolv to give priority to `foo`. IOW, the presence of a package in a lockfile is a signal that we expect the Provides to be met by that package. Use libsolv's `SOLVER_FAVOR` for this.
|
OK, I finally got to the bottom of the CI failure here. Debugging this was way more involved than I expected though I did learn a bunch along the way! Anyway, split that out into #2089. As for this PR, I think I need to tweak things further here before this is ready to go. Specifically, I think this needs to go together with the tweaks needed for libsolv to favor packages we have already cached all else equal (see coreos/coreos-assembler#1431 (comment)). /hold |
|
@jlebon: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@jlebon: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
I think this would still be nice to have but it's subtle to get right and hasn't seemed to come up as much as expected in CoreOS development, so dropping. |
This closes the loop on the "developer experience" when composing with
lockfiles. We want to remain flexible and allow adding/removing packages
from the manifest without editing lockfiles. But we still want libsolv
to give preference to lockfile packages when evaluating alternatives.
For example, if the manifest has a request for a
foobarProvides whichboth
fooandbarprovide andfoois in the lockfile, but notbar, we want libsolv to give priority tofoo. IOW, the presence of apackage in a lockfile is a signal that we expect the Provides to be met
by that package.
Use libsolv's
SOLVER_FAVORfor this.