From 3977aaedb3a5ea1225335c0d5b563a2e22dc2d94 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 12 Sep 2018 15:16:38 +0900 Subject: [PATCH] Remove dependency from db-util Change-Id: I853f6c0c2ca6edb3a4ccaa1cacab17ec93368c83 Signed-off-by: Sangyoon Jang --- CMakeLists.txt | 4 ++-- packaging/pkgmgr-info.spec | 1 - parser/CMakeLists.txt | 2 +- src/pkgmgrinfo_certinfo.c | 2 -- src/pkgmgrinfo_db.c | 6 ++---- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03c002d..a43be7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,14 +14,14 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/parser/inclu ### Required packages INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs REQUIRED glib-2.0 dlog vconf sqlite3 db-util libxml-2.0 libtzplatform-config libsmack bundle) +pkg_check_modules(pkgs REQUIRED glib-2.0 dlog vconf sqlite3 libxml-2.0 libtzplatform-config libsmack bundle) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -pkg_check_modules(libpkgs REQUIRED glib-2.0 dlog vconf sqlite3 db-util libtzplatform-config libsmack bundle capi-system-info minizip) +pkg_check_modules(libpkgs REQUIRED glib-2.0 dlog vconf sqlite3 libtzplatform-config libsmack bundle capi-system-info minizip) FOREACH(flag ${libpkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/packaging/pkgmgr-info.spec b/packaging/pkgmgr-info.spec index 8a9aa79..35ab14a 100644 --- a/packaging/pkgmgr-info.spec +++ b/packaging/pkgmgr-info.spec @@ -12,7 +12,6 @@ BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(sqlite3) -BuildRequires: pkgconfig(db-util) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libtzplatform-config) BuildRequires: pkgconfig(libsmack) diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt index 5b203b5..dce7a93 100644 --- a/parser/CMakeLists.txt +++ b/parser/CMakeLists.txt @@ -33,7 +33,7 @@ endif() ### Get required CFLAGS, LDFLAGS from pkg-config include(FindPkgConfig) -pkg_check_modules(parser_pkgs REQUIRED dlog libxml-2.0 glib-2.0 gio-2.0 sqlite3 db-util vconf bundle capi-system-info libsmack) +pkg_check_modules(parser_pkgs REQUIRED dlog libxml-2.0 glib-2.0 gio-2.0 sqlite3 vconf bundle capi-system-info libsmack) foreach(flag ${parser_pkgs_CFLAGS}) set(parser_pkgs_CFLAGS_str "${parser_pkgs_CFLAGS_str} ${flag}") diff --git a/src/pkgmgrinfo_certinfo.c b/src/pkgmgrinfo_certinfo.c index a524794..23aea4b 100644 --- a/src/pkgmgrinfo_certinfo.c +++ b/src/pkgmgrinfo_certinfo.c @@ -8,8 +8,6 @@ #include #include -#include - #include "pkgmgr-info.h" #include "pkgmgrinfo_debug.h" #include "pkgmgrinfo_private.h" diff --git a/src/pkgmgrinfo_db.c b/src/pkgmgrinfo_db.c index 54492f4..17b0c43 100644 --- a/src/pkgmgrinfo_db.c +++ b/src/pkgmgrinfo_db.c @@ -14,7 +14,6 @@ #include #include -#include #include "pkgmgr-info.h" #include "pkgmgrinfo_debug.h" @@ -256,8 +255,7 @@ API int pkgmgrinfo_pkginfo_set_usr_installed_storage(const char *pkgid, INSTALL_ return PMINFO_R_ERROR; } - ret = db_util_open_with_options(db_path, &pkgmgr_parser_db, - SQLITE_OPEN_READWRITE, NULL); + ret = __open_db(db_path, &pkgmgr_parser_db, SQLITE_OPEN_READWRITE); if (ret != SQLITE_OK) { _LOGE("connect db failed!"); free(db_path); @@ -305,7 +303,7 @@ API int pkgmgrinfo_pkginfo_set_usr_installed_storage(const char *pkgid, INSTALL_ ret = PMINFO_R_OK; catch: - sqlite3_close(pkgmgr_parser_db); + sqlite3_close_v2(pkgmgr_parser_db); sqlite3_free(query); return ret; } -- 2.7.4