Augment repository files with default priority when missing#4454
Conversation
9c14d2a to
02b2c96
Compare
02b2c96 to
ab0fc70
Compare
|
I'm not sure we should be touching repositories in this way, especially repositories supplied as repo files. If they do not have priority set, are we sure it's a mistake? And that What is the motivation behind the change and the actual values? |
|
Context: Assume package P1 exists in two repositories: Q1-> What should dnf resolve to R1 or R2. [We need to understand the default behaviour of DNF] Expected / desired behavior What we are trying to do The exact value is not special; it simply needs to be better than the default, and this can later be extended to allow users to specify a custom priority if needed as you told. |
Not convinced it should be us who slaps a hardwired priority on user-provided repository file, sorry. Why can't we tell user "hey. your repo lacks priority, you're on your own - you want predictability? add |
|
Yes. that’s exactly the right consistency model, and I think we should make it explicit. Proposed rule
|
5a54db7 to
fe9ee30
Compare
LecrisUT
left a comment
There was a problem hiding this comment.
Minor suggestion, otherwise LGTM
|
@vaibhavdaren from the description: I believe this is incorrect, it actually does. default priority is 99, 50 will cause higher prio. |
Introduce DEFAULT_REPOSITORY_PRIORITY (set to 50) to replace the hardcoded priority value of 1 in create_repository(). This provides a sensible default for the tmt-artifact-shared repository while allowing user-provided .repo files to maintain their own priority settings for now
bcde098 to
5cae199
Compare
@thrix : Fixed the description. |
|
The failed test is a flake |
User-provided repository files (via
repository-fileprovider): These are treated as authoritative user input and installed verbatim. If the .repo file defines a priority, it is preserved; if not, no priority is added.tmt-artifact-shared repository: This is an internally-managed repository where downloaded artifacts are aggregated. It has a higher priority (lower numeric value) to have precedence over system repositories.