Fix manifest installation for global app 10/44710/3 accepted/tizen/mobile/20150804.235122 accepted/tizen/tv/20150804.235130 accepted/tizen/wearable/20150804.235147 submit/tizen/20150804.080541
authorSangyoon Jang <s89.jang@samsung.com>
Mon, 27 Jul 2015 04:13:38 +0000 (13:13 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Mon, 27 Jul 2015 06:53:09 +0000 (15:53 +0900)
root user is also for installation of global app

Change-Id: I4b231eb34623b0c4c65ff57e5542c8721fca5327
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
tool/pkg_info.c

index ef51682..0c09f41 100644 (file)
@@ -37,6 +37,8 @@
 #include "pkgmgr-dbinfo.h"
 #include "pkgmgr_installer.h"
 
+#define OWNER_ROOT 0
+
 static void __print_usage();
 static int __get_pkg_info(char *pkgid, uid_t uid);
 static int __get_app_info(char *appid);
@@ -1572,10 +1574,10 @@ static int __insert_manifest_in_db(char *manifest, uid_t uid)
                printf("Manifest file is NULL\n");
                return -1;
        }
-       if (uid != GLOBAL_USER)
-               ret = pkgmgr_parser_parse_usr_manifest_for_installation(manifest, uid, NULL);
-       else
+       if (uid == GLOBAL_USER || uid == OWNER_ROOT)
                ret = pkgmgr_parser_parse_manifest_for_installation(manifest, NULL);
+       else
+               ret = pkgmgr_parser_parse_usr_manifest_for_installation(manifest, uid, NULL);
        if (ret < 0) {
                printf("insert in db failed\n");
                return -1;