[rpm][repo priorities] Package selection issue when both repos have the same priority
Bug #1590525 reported by
Sergey Kulanov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
packetary |
Fix Released
|
High
|
Sergey Kulanov |
Bug Description
There might be situation, when we will have two repos with the same priority, but with different package version, so we can use older version instead of newer, for example
repo1, priority=5, package=bar-1.2
repo2, priority=10, package=foo-5.3
repo3, priority=10, package=foo-7.1
sort by priority [1] can return:
repo1
repo2
repo3
then searching package foo, we will get foo-5.3 instead of foo-7.1
[1].https:/
Changed in packetary: | |
importance: | Undecided → High |
assignee: | nobody → Sergey Kulanov (skulanov) |
status: | New → In Progress |
Changed in packetary: | |
milestone: | none → 0.2.0 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/326590 /git.openstack. org/cgit/ openstack/ packetary/ commit/ ?id=e1f7a5975a8 ab638aa430cb4b4 a67bc3d749c93a
Committed: https:/
Submitter: Jenkins
Branch: master
commit e1f7a5975a8ab63 8aa430cb4b4a67b c3d749c93a
Author: Sergey Kulanov <email address hidden>
Date: Tue Jun 7 18:42:29 2016 +0300
[priority] Merge repos with the same priority
1) We need to merge trees with the same priority in order
to catch case when we have package with different versions in
repos with the same priority, eg:
repo2, priority=10, package=foo-5.3
repo1, priority=5, package=asd-1.2
repo3, priority=10, package=foo-7.1
--> sort(key=priority) can result:
repo1, priority=5, package=asd-1.2
repo2, priority=10, package=foo-5.3
repo3, priority=10, package=foo-7.1
so we will return: foo-5.3 instead we must return foo-7.1
2) priority must be a mandatory parameter for Repository
3) Align rpm default priority _DEFAULT_PRIORITY: N, where
N is an integer from 1 to 99. The default priority for
repositories is 99. The repositories with the lowest
numerical priority number have the highest priority.
Closes-bug: #1590525 68bd1c783487ce7 dc802a31a05
Change-Id: I8299b1502775cc