Skip to content

cmdlib: Lower cost of cosa RPM overrides repo#1432

Merged
openshift-merge-robot merged 1 commit intocoreos:masterfrom
jlebon:pr/lower-overrides-cost
May 7, 2020
Merged

cmdlib: Lower cost of cosa RPM overrides repo#1432
openshift-merge-robot merged 1 commit intocoreos:masterfrom
jlebon:pr/lower-overrides-cost

Conversation

@jlebon
Copy link
Copy Markdown
Member

@jlebon jlebon commented May 7, 2020

Surprisingly, AFAICT there is nothing in libdnf today which
automatically lowers the cost of local repos vs remote ones. Let's give
it some help by adding a cost=500 here (the default is 1000). This
will allow libsolv to always pick the RPM from the overrides repo, even
if the same NEVRA is available from a remote repo.

Surprisingly, AFAICT there is nothing in libdnf today which
automatically lowers the cost of local repos vs remote ones. Let's give
it some help by adding a `cost=500` here (the default is 1000). This
will allow libsolv to always pick the RPM from the overrides repo, even
if the same NEVRA is available from a remote repo.
@jlebon jlebon force-pushed the pr/lower-overrides-cost branch from 056058f to 2d739b6 Compare May 7, 2020 16:54
@jlebon jlebon changed the title cmdlib: Lower cost of RPM overrides cmdlib: Lower cost of cosa RPM overrides repo May 7, 2020
Copy link
Copy Markdown
Contributor

@arithx arithx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arithx, jlebon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jlebon
Copy link
Copy Markdown
Member Author

jlebon commented May 7, 2020

One may wonder, if it's the same RPM from the repos, then why not just let cosa fetch get it from the repos? The answer is twofold:

  1. cosa fetch right now doesn't fetch from cosa overrides, both because it's temporary, and also because well, it's already local. Also, one really expects adding RPMs to overrides/rpm then running cosa build directly without re-running cosa fetch to Just Work even though cosa build is fully offline.
  2. It may be the same NEVRA, but not actually be the same RPM as the build. This can happen for example, if you did fedpkg local on the pkg you wanted to test but forgot to bump the release. We want the overrides repo to take priority (see [merged] core: Checksum package checksums, not just NEVRA for change detection rpm-ostree#296).

@dustymabe
Copy link
Copy Markdown
Member

dustymabe commented May 7, 2020

for my education.. we are setting the cost=500 here. What is the default cost if it's not set?

nvm - it's in the commit message (default = 1000)

@dustymabe
Copy link
Copy Markdown
Member

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants