Changes between Version 2 and Version 3 of CompareProviders

Show
Ignore:
Author:
skvidal (IP: 98.122.161.79)
Timestamp:
05/21/10 15:34:12 (8 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompareProviders

    v2 v3  
    55scoring system to judge which pkg to pick when multiple pkgs provided a dep. The method is in depsolve.py and is called _compare_providers() 
    66 
    7 Obviously if you only have one pkg (or multiple versions of the same pkg) then yum just picks the highest version of that pkg which provides the requirement. 
     7Obviously if you only have one pkg (or multiple versions of the same pkg) then yum just picks the highest version of that pkg which provides the requirement. If one provider is obsoleted and another isn't, the obsoleted one is never going to be picked. 
    88 
    99Here is what _compare_providers() will do - as of roughly yum 3.2.28: 
    13131. if any of the providers is a newer version of something we have installed then increase their score by 5 
    1414 
    15 2. if any of the providers are not the newest version of themselves then decrease their score by 1024 
     152. if any of the providers are not the newest version of themselves then decrease their score by 1024. 
    1616 
    17 3. if any of the providers are obsoleted by another provider, decrease the obsoleted provider's score by 1024 
     173. if any of the providers are obsoleted by another provider, decrease that provider by 1024.  
    1818 
    19194. check the arch distance between the requiring pkg and each of the providers. The pkg with the smallest arch distance