SmackRules::Labels pkgLabels;
try {
- for (auto &app : req.apps) {
- // Check if hybridity is changed if the package is installed
- if (ih.isUserPkgInstalled and ih.isOldPkgHybrid != req.isHybrid) {
+ // Check if hybridity is changed if the package is installed
+ if (ih.isUserPkgInstalled && ih.isOldPkgHybrid != req.isHybrid) {
+ for (auto &app : req.apps) {
std::string oldAppLabel = SmackLabels::generateProcessLabel(
app.appName, req.pkgName, ih.isOldPkgHybrid);
SmackRules::uninstallApplicationRules(app.appName, oldAppLabel);
+ if (req.isHybrid) // was not hybrid - all labels were the same
+ break;
}
}
SmackRules::installApplicationRules(app.appName, appLabel, req.pkgName,
authorId, pkgLabels);
+ if (!req.isHybrid) // is not hybrid - all labels are the same
+ break;
}
SmackRules::generateSharedRORules(pkgsProcessLabels, pkgsInfo);