From beedaae7631442f1cce2f52c8ae963fb9357ce0b Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Mon, 21 Oct 2013 14:02:28 +0800 Subject: [PATCH] Revert workaround and fix build issue 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 --- CMakeLists.txt | 6 +++--- server/src/pkgmgr-server.c | 13 +++---------- tool/pkg_info.c | 6 ------ 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d139429..89bc993 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/server/src/pkgmgr-server.c b/server/src/pkgmgr-server.c index 1d576a7..d065ca9 100755 --- a/server/src/pkgmgr-server.c +++ b/server/src/pkgmgr-server.c @@ -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"); diff --git a/tool/pkg_info.c b/tool/pkg_info.c index dc49d69..9693a1a 100755 --- a/tool/pkg_info.c +++ b/tool/pkg_info.c @@ -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) -- 2.7.4