Calling sortUpgrades from install.py -- shouldn't it be sortInternalRequires?

Gustavo Niemeyer gustavo at niemeyer.net
Tue May 15 06:57:03 PDT 2007


Hello Jan,

(...)
> I wonder:
> 
> - Shouldn't the sortUpgrades(pkgs) call also include the policy
>   parameter, to use the policy from install.py's main?

If you look at the implementation, you'll see that the policy provides
a caching mechanism used by the transaction computing to avoid
recomputing priorities over and over again. In this specific case, the
caching isn't really important.

> - Why does the main function call sortUpgrades in the first place --
>   shouldn't it be calling something like sortInternalRequires instead?
>   If we install a list of packages (pkgs), why do we potentially also
>   add packages that are being upgraded by pkgs?

We don't.. it's just sorting the list of matched packages do get the
best choices. It's not mutating the list.

-- 
Gustavo Niemeyer
http://niemeyer.net



More information about the Smart mailing list