- // Primary
- Res &= Res && VisitDeps(Primary,Pkg);
- Res &= Res && VisitRDeps(Primary,Pkg);
- Res &= Res && VisitRProvides(Primary,Pkg.CurrentVer());
- Res &= Res && VisitRProvides(Primary,Cache[Pkg].InstVerIter(Cache));
-
- // RevDep
- Res &= Res && VisitRDeps(RevDepends,Pkg);
- Res &= Res && VisitRProvides(RevDepends,Pkg.CurrentVer());
- Res &= Res && VisitRProvides(RevDepends,Cache[Pkg].InstVerIter(Cache));
-
- // Secondary
- Res &= Res && VisitDeps(Secondary,Pkg);
- Res &= Res && VisitRDeps(Secondary,Pkg);
- Res &= Res && VisitRProvides(Secondary,Pkg.CurrentVer());
- Res &= Res && VisitRProvides(Secondary,Cache[Pkg].InstVerIter(Cache));
- }
- else
- {
- // RevDep
- Res &= Res && VisitRDeps(Remove,Pkg);
- Res &= Res && VisitRProvides(Remove,Pkg.CurrentVer());
+ bool Res = true;
+ if (Cache[Pkg].Delete() == false)
+ {
+ // Primary
+ Res &= Res && VisitDeps(Primary,Pkg);
+ Res &= Res && VisitRDeps(Primary,Pkg);
+ Res &= Res && VisitRProvides(Primary,Pkg.CurrentVer());
+ Res &= Res && VisitRProvides(Primary,Cache[Pkg].InstVerIter(Cache));
+
+ // RevDep
+ Res &= Res && VisitRDeps(RevDepends,Pkg);
+ Res &= Res && VisitRProvides(RevDepends,Pkg.CurrentVer());
+ Res &= Res && VisitRProvides(RevDepends,Cache[Pkg].InstVerIter(Cache));
+
+ // Secondary
+ Res &= Res && VisitDeps(Secondary,Pkg);
+ Res &= Res && VisitRDeps(Secondary,Pkg);
+ Res &= Res && VisitRProvides(Secondary,Pkg.CurrentVer());
+ Res &= Res && VisitRProvides(Secondary,Cache[Pkg].InstVerIter(Cache));
+ }
+ else
+ {
+ // RevDep
+ Res &= Res && VisitRDeps(Remove,Pkg);
+ Res &= Res && VisitRProvides(Remove,Pkg.CurrentVer());
+ }