@@ -1033,7 +1033,7 @@ solver_addpkgrulesforsolvable(Solver *solv, Solvable *s, Map *m)
10331033
10341034 if (m && pool -> implicitobsoleteusescolors && pool_arch2score (pool , s -> arch ) > 1 )
10351035 {
1036- int pa , a = pool_arch2score (pool , s -> arch );
1036+ unsigned int pa , a = pool_arch2score (pool , s -> arch );
10371037 /* check lock-step candidates */
10381038 FOR_PROVIDES (p , pp , s -> name )
10391039 {
@@ -1532,7 +1532,8 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
15321532 Pool * pool = solv -> pool ;
15331533 Repo * installed = pool -> installed ;
15341534 int first , i , j ;
1535- Id p , pp , a , aa , bestarch ;
1535+ Id p , pp , aa ;
1536+ unsigned int a , bestscore ;
15361537 Solvable * s , * ps , * bests ;
15371538 Queue badq , allowedarchs ;
15381539 Queue lsq ;
@@ -1547,7 +1548,7 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
15471548 continue ;
15481549 s = pool -> solvables + i ;
15491550 first = i ;
1550- bestarch = 0 ;
1551+ bestscore = 0 ;
15511552 bests = 0 ;
15521553 queue_empty (& allowedarchs );
15531554 FOR_PROVIDES (p , pp , s -> name )
@@ -1567,9 +1568,9 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
15671568 queue_pushunique (& allowedarchs , ps -> arch ); /* also ok to keep this architecture */
15681569 continue ; /* but ignore installed solvables when calculating the best arch */
15691570 }
1570- if (a && a != 1 && (!bestarch || a < bestarch ))
1571+ if (a && a != 1 && (!bestscore || a < bestscore ))
15711572 {
1572- bestarch = a ;
1573+ bestscore = a ;
15731574 bests = ps ;
15741575 }
15751576 }
@@ -1580,7 +1581,7 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
15801581 if (allowedarchs .count == 1 && bests && allowedarchs .elements [0 ] == bests -> arch )
15811582 allowedarchs .count -- ; /* installed arch is best */
15821583
1583- if (allowedarchs .count && pool -> implicitobsoleteusescolors && installed && bestarch )
1584+ if (allowedarchs .count && pool -> implicitobsoleteusescolors && installed && bestscore )
15841585 {
15851586 /* need an extra pass for lockstep checking: we only allow to keep an inferior arch
15861587 * if the corresponding installed package is not lock-stepped */
@@ -1599,17 +1600,17 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
15991600 queue_pushunique (& allowedarchs , ps -> arch ); /* strange arch, allow */
16001601 continue ;
16011602 }
1602- if (a == 1 || ((a ^ bestarch ) & 0xffff0000 ) == 0 )
1603+ if (a == 1 || ((a ^ bestscore ) & 0xffff0000 ) == 0 )
16031604 continue ;
16041605 /* have installed package with inferior arch, check if lock-stepped */
16051606 FOR_PROVIDES (p2 , pp2 , s -> name )
16061607 {
16071608 Solvable * s2 = pool -> solvables + p2 ;
1608- Id a2 ;
1609+ unsigned int a2 ;
16091610 if (p2 == p || s2 -> name != s -> name || s2 -> evr != pool -> solvables [p ].evr || s2 -> arch == pool -> solvables [p ].arch )
16101611 continue ;
16111612 a2 = pool_arch2score (pool , s2 -> arch );
1612- if (a2 && (a2 == 1 || ((a2 ^ bestarch ) & 0xffff0000 ) == 0 ))
1613+ if (a2 && (a2 == 1 || ((a2 ^ bestscore ) & 0xffff0000 ) == 0 ))
16131614 break ;
16141615 }
16151616 if (!p2 )
@@ -1625,7 +1626,7 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
16251626 if (ps -> name != s -> name || !MAPTST (addedmap , p ))
16261627 continue ;
16271628 a = pool_arch2score (pool , ps -> arch );
1628- if (a != 1 && bestarch && ((a ^ bestarch ) & 0xffff0000 ) != 0 )
1629+ if (a != 1 && bestscore && ((a ^ bestscore ) & 0xffff0000 ) != 0 )
16291630 {
16301631 if (installed && ps -> repo == installed )
16311632 {
@@ -1635,11 +1636,12 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
16351636 }
16361637 for (j = 0 ; j < allowedarchs .count ; j ++ )
16371638 {
1639+ unsigned int aas ;
16381640 aa = allowedarchs .elements [j ];
16391641 if (ps -> arch == aa )
16401642 break ;
1641- aa = pool_arch2score (pool , aa );
1642- if (aa && ((a ^ aa ) & 0xffff0000 ) == 0 )
1643+ aas = pool_arch2score (pool , aa );
1644+ if (aas && ((a ^ aas ) & 0xffff0000 ) == 0 )
16431645 break ; /* compatible */
16441646 }
16451647 if (j == allowedarchs .count )
@@ -1651,7 +1653,7 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
16511653 for (j = 0 ; j < badq .count ; j ++ )
16521654 {
16531655 p = badq .elements [j ];
1654- /* lock-step */
1656+ /* special lock-step handling */
16551657 if (pool -> implicitobsoleteusescolors )
16561658 {
16571659 Id p2 ;
@@ -1663,7 +1665,7 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
16631665 if (p2 == p || s2 -> name != s -> name || s2 -> evr != pool -> solvables [p ].evr || s2 -> arch == pool -> solvables [p ].arch )
16641666 continue ;
16651667 a = pool_arch2score (pool , s2 -> arch );
1666- if (a && (a == 1 || ((a ^ bestarch ) & 0xffff000 ) == 0 ))
1668+ if (a && (a == 1 || ((a ^ bestscore ) & 0xffff000 ) == 0 ))
16671669 {
16681670 queue_push (& lsq , p2 );
16691671 if (installed && s2 -> repo == installed )
0 commit comments