char message[MAX_MESSAGE_LEN];
list_dir_old_tpk = __list_directory(old_tpk_path, old_tpk_path, list_dir_old_tpk);
- list_dir_new_tpk = __list_directory(new_tpk_path, new_tpk_path, list_dir_new_tpk);
if (list_dir_old_tpk == NULL) {
printf("Could Not read %s\n", old_tpk_path);
return;
}
+ list_dir_new_tpk = __list_directory(new_tpk_path, new_tpk_path, list_dir_new_tpk);
if (list_dir_new_tpk == NULL) {
printf("Could Not read %s\n", new_tpk_path);
+ __free_g_list(list_dir_old_tpk);
return;
}
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <errno.h>
#include <unistd.h>
#include <ctype.h>
#include <getopt.h>
char cwd[1024] = {0, };
char *tmp = NULL;
int nitems, i;
+ int ret;
if (chdir(path) < 0) {
printf("failed to chdir[%s]\n", path);
tmp = g_hash_table_lookup(valid_file_list, abs_path);
if (tmp == NULL) {
printf("deleting [%s]\n", abs_path);
- remove(abs_path);
+ ret = remove(abs_path);
+ if (ret == -1) {
+ printf("failed to remove [%s][%d]\n",
+ abs_path, errno);
+ }
}
}
}
ret = pkgmgrinfo_compare_package_version(version,
pkg_info->version, &compare);
+ if (ret != PMINFO_R_OK) {
+ _LOG("can not compare pkg version[%s]\n",
+ pkg_info->pkgid);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ continue;
+ }
+
if (compare != PMINFO_VERSION_NEW) {
/* package version is not update on FOTA. */
_LOG("pkg is not updated\n");