protected override void OnAfterPackageWalk(IPackage package)
{
if (!Repository.Exists(package))
{
// Don't add the package for installation if it already exists in the repository
_operations.AddOperation(new PackageOperation(package, PackageAction.Install));
}
else
{
// If we already added an entry for removing this package then remove it
// (it's equivalent for doing +P since we're removing a -P from the list)
_operations.RemoveOperation(package, PackageAction.Uninstall);
}
}