From 4b71da874cf1f8ec4aaf5d0dc289afce288c635d Mon Sep 17 00:00:00 2001 From: Krzysztof Jackiewicz Date: Wed, 4 May 2016 11:26:46 +0200 Subject: [PATCH] Fix the update of package cross-rules during uninstallation [Problem] During app uninstallation the package rules are updated basing on the list of apps being a part of the package. However the app being uninstalled is not removed from this list which may generate unwanted smack rules. [Solution] Remove uninstalled app from package contents list. [Verification] Test is not yet implemented. Change-Id: I867e65a996d0c797dfab9bcaaf15bbaf1a4261c4 --- src/common/service_impl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/service_impl.cpp b/src/common/service_impl.cpp index ce4e32d..9aaafc5 100755 --- a/src/common/service_impl.cpp +++ b/src/common/service_impl.cpp @@ -562,6 +562,7 @@ int ServiceImpl::appUninstall(const Credentials &creds, app_inst_req &&req) SmackRules::uninstallPackageRules(req.pkgName); if (!removePkg) { LogDebug("Recreating Smack rules for pkgName " << req.pkgName); + pkgContents.erase(std::remove(pkgContents.begin(), pkgContents.end(),req.appName), pkgContents.end()); SmackRules::updatePackageRules(req.pkgName, pkgContents, allTizen2XApps); } } -- 2.7.4