}
} else {
- /*If the status is success, then update installed storage to pkgmgr_parser db*/
+ /*If the status is success, then update installed storage to pkgmgr_parser db*/
int rt = 0;
- pkgmgrinfo_pkgdbinfo_h handle = NULL;
- rt = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
+ rt = pkgmgrinfo_pkginfo_set_installed_storage(pkgid, INSTALL_EXTERNAL);
if (rt < 0) {
- app2ext_print("pkgmgrinfo_create_pkgdbinfo[%s] fail.. \n", pkgid);
- }
- rt = pkgmgrinfo_set_installed_storage_to_pkgdbinfo(handle, INSTALL_EXTERNAL);
- if (rt < 0) {
- app2ext_print("fail to update installed location to db[%s, %s]\n", pkgid, INSTALL_EXTERNAL);
- }
- rt =pkgmgrinfo_save_pkgdbinfo(handle);
- if (rt < 0) {
- app2ext_print("pkgmgrinfo_save_pkgdbinfo[%s] failed\n", pkgid);
- }
- rt =pkgmgrinfo_destroy_pkgdbinfo(handle);
- if (rt < 0) {
- app2ext_print("pkgmgrinfo_destroy_pkgdbinfo[%s] failed\n", pkgid);
+ app2ext_print("fail to update installed location to db[%s, %d]\n", pkgid, INSTALL_EXTERNAL);
}
}
return ret;
goto END;
}
- /*If move is completed, then update installed storage to pkgmgr_parser db*/
- pkgmgrinfo_pkgdbinfo_h handle = NULL;
- pkgmgrinfo_ret = pkgmgrinfo_create_pkgdbinfo(pkgid, &handle);
- if (pkgmgrinfo_ret < 0) {
- app2ext_print("App2Sd Error : pkgmgrinfo_create_pkgdbinfo[%s] fail.. \n", pkgid);
- }
-
+ /*If move is completed, then update installed storage to pkgmgr_parser db*/
if (move_type == APP2EXT_MOVE_TO_EXT) {
- pkgmgrinfo_ret = pkgmgrinfo_set_installed_storage_to_pkgdbinfo(handle, INSTALL_EXTERNAL);
+ pkgmgrinfo_ret = pkgmgrinfo_pkginfo_set_installed_storage(pkgid, INSTALL_EXTERNAL);
if (pkgmgrinfo_ret < 0) {
app2ext_print("App2Sd Error : fail to update installed location to db[%s, %s]\n", pkgid, INSTALL_EXTERNAL);
}
} else {
- pkgmgrinfo_ret = pkgmgrinfo_set_installed_storage_to_pkgdbinfo(handle, INSTALL_INTERNAL);
+ pkgmgrinfo_ret = pkgmgrinfo_pkginfo_set_installed_storage(pkgid, INSTALL_INTERNAL);
if (pkgmgrinfo_ret < 0) {
app2ext_print("App2Sd Error : fail to update installed location to db[%s, %s]\n", pkgid, INSTALL_INTERNAL);
}
}
- pkgmgrinfo_ret =pkgmgrinfo_save_pkgdbinfo(handle);
- if (pkgmgrinfo_ret < 0) {
- app2ext_print("pkgmgrinfo_save_pkgdbinfo[%s] failed\n", pkgid);
- }
- pkgmgrinfo_ret =pkgmgrinfo_destroy_pkgdbinfo(handle);
- if (pkgmgrinfo_ret < 0) {
- app2ext_print("pkgmgrinfo_destroy_pkgdbinfo failed\n");
- }
-
END:
_app2sd_make_result_info_file((char*)pkgid, ret);