sqlite3 *pkgmgr_parser_db = NULL;
char *query = NULL;
char *db_path;
+ const char *location_str;
db_path = getUserPkgParserDBPathUID(uid);
if (db_path == NULL) {
tryvm_if(ret != SQLITE_OK, ret = PMINFO_R_ERROR, "Failed to begin transaction\n");
_LOGD("Transaction Begin\n");
+ if (location == INSTALL_INTERNAL)
+ location_str = "installed_internal";
+ else if (location == INSTALL_EXTERNAL)
+ location_str = "installed_external";
+ else
+ location_str = "installed_extended";
/* pkgcakge_info table */
query = sqlite3_mprintf(
"update package_info set installed_storage=%Q, external_path=%Q where package=%Q",
- location ? "installed_external" : "installed_internal", external_pkg_path, pkgid);
+ location_str, external_pkg_path, pkgid);
ret = sqlite3_exec(pkgmgr_parser_db, query, NULL, NULL, NULL);
tryvm_if(ret != SQLITE_OK, ret = PMINFO_R_ERROR, "Don't execute query = %s\n", query);
/* package_app_info table */
query = sqlite3_mprintf(
"update package_app_info set app_installed_storage=%Q, app_external_path=%Q where package=%Q",
- location ? "installed_external" : "installed_internal", external_pkg_path, pkgid);
+ location_str, external_pkg_path, pkgid);
ret = sqlite3_exec(pkgmgr_parser_db, query, NULL, NULL, NULL);
tryvm_if(ret != SQLITE_OK, ret = PMINFO_R_ERROR, "Don't execute query = %s\n", query);