modify default app command behavior for uninstall command 49/101049/1 accepted/tizen/3.0/common/20161130.133819 accepted/tizen/3.0/ivi/20161130.092433 accepted/tizen/3.0/mobile/20161130.092341 accepted/tizen/3.0/tv/20161130.092400 accepted/tizen/3.0/wearable/20161130.092419 submit/tizen_3.0/20161130.075858
authorgreatim <jaewon81.lim@samsung.com>
Wed, 30 Nov 2016 07:22:59 +0000 (16:22 +0900)
committergreatim <jaewon81.lim@samsung.com>
Wed, 30 Nov 2016 07:22:59 +0000 (16:22 +0900)
modify default app command behavior for uninstall command

Change-Id: I8acbd3761af9672f6d51a2f94330bfe3509938da
Signed-off-by: greatim <jaewon81.lim@samsung.com>
src/default_plugin_appcmd.c

index 3fd2f64..4bc158e 100644 (file)
@@ -95,22 +95,20 @@ static int appcmd_install_gen_shellcmd(appcmd_info* p_info) {
 }
 
 static int appcmd_uninstall_gen_shellcmd(appcmd_info* p_info) {
-    char *type = NULL;
     char *pkgid = NULL;
     char *buf = p_info->shell_cmd;
     int len = sizeof(p_info->shell_cmd);
 
-    if (p_info->args_cnt != 3) {
+    if (p_info->args_cnt != 2) {
         D("failed to parse appcmd.(cnt=%d)\n", p_info->args_cnt);
         return -1;
     }
 
-    type = p_info->args[1];
-    pkgid = p_info->args[2];
+    pkgid = p_info->args[1];
 
-    D("args: type=%s, pkgid=%s\n", type, pkgid);
+    D("args: pkgid=%s\n", pkgid);
 
-    snprintf(buf, len, "pkgcmd -u -q -t %s -n %s", type, pkgid);
+    snprintf(buf, len, "pkgcmd -u -q -n %s", pkgid);
 
     return 0;
 }