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

Jan Pazdziora jpazdziora at redhat.com
Thu May 10 02:58:38 PDT 2007


Hello,

I'm debugging one issue concerning Obsoletes (upgrades + conflicts) and
I hit a part of smart's code that seems strange to me at the first
sight:

In commands/install.py, there is a

	sortUpgrades(pkgs)

call in the main function. In transaction.py, the

	sortUpgrades(pkgs, policy=None)

invokes

	recursiveUpgrades(pkg, dct)
	
to add packages from pkg.upgrades to the pkgs list.

I wonder:

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

- 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?

Any hint would be appreciated,

-- 
Jan Pazdziora



More information about the Smart mailing list