summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangyoon Jang <jeremy.jang@samsung.com>2023-02-15 14:32:50 +0900
committerSangyoon Jang <jeremy.jang@samsung.com>2023-02-15 14:32:50 +0900
commit34aedb3e7cbdd98e95b9406d6ce46023d2d506fd (patch)
tree221b980daa1454f7c75a51b273f972dd73579a96
parent8a517117325485d175b6e8fd66b078933c84c1a4 (diff)
downloadpkgmgr-server-34aedb3e7cbdd98e95b9406d6ce46023d2d506fd.tar.gz
pkgmgr-server-34aedb3e7cbdd98e95b9406d6ce46023d2d506fd.tar.bz2
pkgmgr-server-34aedb3e7cbdd98e95b9406d6ce46023d2d506fd.zip
Fix disable/enable packages
Remove checking if the package is global or not. In the past, the package with same id can be installed for global and user pkg, so it should be checked requested package is global or not. But for now, the package cannot be installed in both side at the same time. Change-Id: I38c32acd7732c0a97c5924fa12c70ce43762df56 Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
-rw-r--r--src/pkgmgr-server.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/pkgmgr-server.c b/src/pkgmgr-server.c
index 63c832c..aeb0e32 100644
--- a/src/pkgmgr-server.c
+++ b/src/pkgmgr-server.c
@@ -1085,7 +1085,6 @@ static int __process_enable_pkg(struct backend_job *job)
char args[MAX_PKG_ARGS_LEN];
pkgmgrinfo_pkginfo_h pkginfo_h;
bool is_readonly;
- bool is_global;
int ret;
int pid;
@@ -1100,20 +1099,6 @@ static int __process_enable_pkg(struct backend_job *job)
return -1;
}
- ret = pkgmgrinfo_pkginfo_is_global(pkginfo_h, &is_global);
- if (ret != PMINFO_R_OK) {
- ERR("Failed to get global value");
- pkgmgrinfo_pkginfo_destroy_pkginfo(pkginfo_h);
- return -1;
- }
-
- if ((is_global && job->target_uid != GLOBAL_USER) ||
- (!is_global && job->target_uid == GLOBAL_USER)) {
- ERR("Invalid attempt to enable pkg");
- pkgmgrinfo_pkginfo_destroy_pkginfo(pkginfo_h);
- return -1;
- }
-
ret = pkgmgrinfo_pkginfo_is_readonly(pkginfo_h, &is_readonly);
if (ret != PMINFO_R_OK) {
ERR("Failed to get readonly value");
@@ -1140,7 +1125,6 @@ static int __process_disable_pkg(struct backend_job *job)
char args[MAX_PKG_ARGS_LEN];
pkgmgrinfo_pkginfo_h pkginfo_h;
bool is_readonly;
- bool is_global;
int ret;
int pid;
@@ -1155,20 +1139,6 @@ static int __process_disable_pkg(struct backend_job *job)
return -1;
}
- ret = pkgmgrinfo_pkginfo_is_global(pkginfo_h, &is_global);
- if (ret != PMINFO_R_OK) {
- ERR("Failed to get global value");
- pkgmgrinfo_pkginfo_destroy_pkginfo(pkginfo_h);
- return -1;
- }
-
- if ((is_global && job->target_uid != GLOBAL_USER) ||
- (!is_global && job->target_uid == GLOBAL_USER)) {
- ERR("Invalid attempt to disable pkg");
- pkgmgrinfo_pkginfo_destroy_pkginfo(pkginfo_h);
- return -1;
- }
-
ret = pkgmgrinfo_pkginfo_is_readonly(pkginfo_h, &is_readonly);
if (ret != PMINFO_R_OK) {
ERR("Failed to get readonly value");