Sorting Packages

The following algorithm sorts two sets of packages based on the name and version numbers of each package. Given two sets of packages OldPackageSet and NewPackageSet, the packages are sorted as follows:

ToReplacePackages

This is a list of packages from NewPackageSet that will replace packages in OldPackageSet.

AddedPackages

This is a list of packages from NewPackageSet that do not exist in OldPackageSet.

UntouchedPackages

This is a list of packages from OldPackageSet that have no equivilent in NewPackageSet.

ReplacedPackages

This is a list of packages from OldPackageSet that will be replaced by packages in NewPackageSet.