[rpm][repo priorities] Package selection issue when both repos have the same priority

Bug #1590525 reported by Sergey Kulanov
6
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://github.com/openstack/packetary/blob/master/packetary/controllers/repository.py#L70

Changed in packetary:
importance: Undecided → High
assignee: nobody → Sergey Kulanov (skulanov)
status: New → In Progress
Changed in packetary:
milestone: none → 0.2.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to packetary (master)

Reviewed: https://review.openstack.org/326590
Committed: https://git.openstack.org/cgit/openstack/packetary/commit/?id=e1f7a5975a8ab638aa430cb4b4a67bc3d749c93a
Submitter: Jenkins
Branch: master

commit e1f7a5975a8ab638aa430cb4b4a67bc3d749c93a
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
    Change-Id: I8299b1502775cc68bd1c783487ce7dc802a31a05

Changed in packetary:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.