Changes between Version 8 and Version 9 of CompareProviders

Show
Ignore:
Author:
james (IP: 65.172.155.225)
Timestamp:
03/06/13 21:00:40 (5 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompareProviders

    v8 v9  
    25253b) Candidates with the same (or similar) arch as the system have more pulls than those with  a less similar arch 
    2626 
    27 3c) Candidates with close relationships to the already installed system have more pull than those that would dramatically change the installed system 
     273c) Candidates with close relationships to the already installed system (and transaction/requestor) have more pull than those that would require more changes to the installed system 
    2828 
    29294)  In the event of a tie, candidates with very long names will lose the tie 
    36360. each pkg starts out with a score of 0. 
    3737 
    38 0. All packages are passed to any compare_providers hooks in plugins. 
     381. All packages are passed to any compare_providers hooks in plugins. 
    3939 
    40 1. if any of the providers is a newer version of something we have installed then increase their score by 5 
     402. if any of the providers is a newer version of something we have installed then increase their score by 5 
    4141 
    42 1. if any of the providers is the same version of something we have installed then increase their score by 1000 
     423. if any of the providers is the same version of something we have installed then increase their score by 1000 
    4343 
    44 2. if any of the providers is an older version of something we have installed then decrease their score by 1024. 
     444. if any of the providers is an older version of something we have installed then decrease their score by 1024. 
    4545 
    46 3. if any of the providers are obsoleted by another provider, decrease that provider by 1024.  
     465. if any of the providers are obsoleted by another provider, decrease that provider by 1024.  
    4747 
    48 4. check the arch distance between the requiring pkg and each of the providers. The pkg with the smallest arch distance gets a 5 added to their score. Do the same check but comparing the pkg arch distance to the system arch, not the requiring pkg arch 
     486. check the arch distance between the requiring pkg and each of the providers. The pkg with the smallest arch distance gets a 5 added to their score. Do the same check but comparing the pkg arch distance to the system arch, not the requiring pkg arch 
    4949 
    50 5. compare the sourcerpm  on each provider to the requiring pkg's source rpm. If they share a sourcerpm add 20 to the score 
     507. compare the sourcerpm  on each provider to the requiring pkg's source rpm. If they share a sourcerpm add 20 to the score 
    5151 
    52 6. check the base pkg for each subpkg. If the base pkg is installed on the system add 5 to the provider's score. 
     528. check the base pkg for each subpkg. If the base pkg is installed on the system add 5 to the provider's score. 
    5353 
    54 7. check the prefix of the pkg to the requiring pkg prefix (perl-foo and perl-lib) for each common character in the prefix add 2 points to the provider's score. 
     549. check the prefix of the pkg to the requiring pkg prefix (perl-foo and perl-lib) for each common character in the prefix add 2 points to the provider's score. 
    5555 
    56 8. if, at this point, we have pkgs with an equal score - look at the version of the provide, and if all providers of the top score have a specific version then compare those versions and choose the newest. 
     5610. if, at this point, we have pkgs with an equal score - look at the version of the provide, and if all providers of the top score have a specific version then compare those versions and choose the newest. 
    5757 
    58 8. if, at this point, we have pkgs with an equal score - look at the deplist (one layer deep) and see what they would pull in that is NOT already installed. Add 1 to the score of the pkg with the least new deps to be pulled in. 
     5811. if, at this point, we have pkgs with an equal score - look at the deplist (one layer deep) and see what they would pull in that is NOT already installed. Add 1 to the score of the pkg with the least new deps to be pulled in. 
    5959 
    60 9. if all else fails and we STILL have  two pkgs with the same score - take the leaders from the list and compare their name length. We add 1,000 and then subtract the length of the number of character's in the pkgs name from its score (the addition of 1000 is to ensure that one of the leaders will be picked). 
     6012. if all else fails and we STILL have  two pkgs with the same score - take the leaders from the list and compare their name length. We add 1,000 and then subtract the length of the number of character's in the pkgs name from its score (the addition of 1000 is to ensure that one of the leaders will be picked). 
    6161 
    62 10. return the list of providers, sorted best to worst. 
     6213. return the list of providers, sorted best to worst. 
    6363 
    64 11. if the packages are the same length, then the packages are compared as shown in "yum list". The one lower in the list will win. 
     6414. if the packages are the same length, then the packages are compared as shown in "yum list". The one lower in the list will win. 
    6565 
    6666In all cases we currently just take the winner (first entry) and throw the rest away.