Revert workaround and fix build issue 37/11137/1 accepted/tizen/20131022.010923 accepted/tizen/20131022.162820 accepted/tizen/20131112.015416 accepted/tizen_ivi_stable/20131116.110514 submit/tizen/20131021.224902 submit/tizen_ivi_stable/20131116.100251
authorChengwei Yang <chengwei.yang@intel.com>
Mon, 21 Oct 2013 06:02:28 +0000 (14:02 +0800)
committerChengwei Yang <chengwei.yang@intel.com>
Mon, 21 Oct 2013 06:13:44 +0000 (14:13 +0800)
Workarounds was introduced in 5556559 did fix build, but more
importantly make pkgmgr useless and trigger amd crash (PTREL-133). This
commit revert the workaround and fix the issue in sure.

Bug: https://bugs.tizen.org/jira/browse/PTREL-134
Change-Id: I45700c2c794394049130bdd7e9a0d1bd9442da18
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
CMakeLists.txt
server/src/pkgmgr-server.c
tool/pkg_info.c

index d139429..89bc993 100644 (file)
@@ -28,16 +28,16 @@ INCLUDE(FindPkgConfig)
 OPTION(X11_SUPPORT "Enable X support" ON)
 IF(X11_SUPPORT)
     ADD_DEFINITIONS("-DHAVE_X11")
-    pkg_check_modules(pkgs REQUIRED security-server dlog elementary evas ecore appcore-efl ecore-x ail ecore-file pkgmgr-info iniparser)
+    pkg_check_modules(pkgs REQUIRED security-server dlog elementary evas ecore appcore-efl ecore-x ail ecore-file pkgmgr-parser pkgmgr-info iniparser)
 ELSE()
-    pkg_check_modules(pkgs REQUIRED security-server dlog elementary evas ecore appcore-efl ecore-wayland ail ecore-file pkgmgr-info iniparser)
+    pkg_check_modules(pkgs REQUIRED security-server dlog elementary evas ecore appcore-efl ecore-wayland ail ecore-file pkgmgr-parser pkgmgr-info iniparser)
 ENDIF(X11_SUPPORT)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-pkg_check_modules(libpkgs REQUIRED dbus-glib-1 dlog ail pkgmgr-info iniparser)
+pkg_check_modules(libpkgs REQUIRED dbus-glib-1 dlog ail pkgmgr-parser pkgmgr-info iniparser)
 
 FOREACH(flag ${libpkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 1d576a7..d065ca9 100755 (executable)
@@ -1686,9 +1686,7 @@ pop:
                        } else { /* in case of package */
                                DBGE("(De)activate PKG[pkgid=%s, val=%d]", item->pkgid, val);
                                char *manifest = NULL;
-                               
-                                // FIXME!!!! pkgmgr_parser_get_manifest_file does not exist!
-                                //manifest = pkgmgr_parser_get_manifest_file(item->pkgid);
+                               manifest = pkgmgr_parser_get_manifest_file(item->pkgid);
                                if (manifest == NULL) {
                                        DBGE("Failed to fetch package manifest file\n");
                                        exit(1);
@@ -1697,12 +1695,9 @@ pop:
 
                                if (val) {
                                        pkgmgrinfo_pkginfo_h handle;
-
                                        ret = pkgmgrinfo_pkginfo_get_pkginfo(item->pkgid, &handle);
                                        if (ret < 0) {
-                                                // FIXME!!!! pkgmgr_parser_parse_manifest_for_installation does not exist!
-                                               // ret = pkgmgr_parser_parse_manifest_for_installation(manifest, NULL);
-                                                ret = -1;
+                                               ret = pkgmgr_parser_parse_manifest_for_installation(manifest, NULL);
                                                if (ret < 0) {
                                                        DBGE("insert in db failed\n");
                                                }
@@ -1730,9 +1725,7 @@ pop:
                                        }
                                }
                                else
-                                        // FIXME!!!! pkgmgr_parser_parse_manifest_for_uninstallation does not exist!
-                                        ret = -1;
-                                       //ret = pkgmgr_parser_parse_manifest_for_uninstallation(manifest, NULL);
+                                       ret = pkgmgr_parser_parse_manifest_for_uninstallation(manifest, NULL);
 
                                if (ret < 0) {
                                        DBGE("insert in db failed\n");
index dc49d69..9693a1a 100755 (executable)
@@ -1545,7 +1545,6 @@ static int __set_pkginfo_in_db(char *pkgid)
 
 static int __insert_manifest_in_db(char *manifest)
 {
-#if 0 // FIXME!!!! This method depends on a non-existant pkgmgr_parser_parse_manifest_for_installation
        int ret = 0;
        if (manifest == NULL) {
                printf("Manifest file is NULL\n");
@@ -1556,13 +1555,11 @@ static int __insert_manifest_in_db(char *manifest)
                printf("insert in db failed\n");
                return -1;
        }
-#endif
        return 0;
 }
 
 static int __fota_insert_manifest_in_db(char *manifest)
 {
-#if 0 // FIXME!!!!! This method depends on a non-existant pkgmgr_parser_parse_manifest_for_installation
        int ret = 0;
        char *temp[] = {"fota=true", NULL};
 
@@ -1576,12 +1573,10 @@ static int __fota_insert_manifest_in_db(char *manifest)
                return -1;
        }
        return 0;
-#endif
 }
 
 static int __remove_manifest_from_db(char *manifest)
 {
-#if 0 // FIXME!!! pkgmgr_parser_parse_manifest_for_uninstallation does not exist!
        int ret = 0;
        if (manifest == NULL) {
                printf("Manifest file is NULL\n");
@@ -1593,7 +1588,6 @@ static int __remove_manifest_from_db(char *manifest)
                return -1;
        }
        return 0;
-#endif
 }
 
 int app_func(const pkgmgr_appinfo_h handle, void *user_data)