From: Mateusz Moscicki Date: Fri, 27 May 2022 14:05:04 +0000 (+0200) Subject: Add support for the Full Upgrade X-Git-Tag: submit/tizen/20220630.103030~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46323d0f7d6b3696a21eb82428bf4c0949ee7a4a;p=platform%2Fcore%2Fsystem%2Fupdate-control.git Add support for the Full Upgrade The full upgrade can be applied to any version of the system. Therefore the file build_string.txt contained in the delta.tar has "0.0" as its source version. Change-Id: I181a0978782467670241fcfbe99dcbdc0add9a73 --- diff --git a/update-manager/fota/fota-installer.c b/update-manager/fota/fota-installer.c index 489e13c..62dbade 100644 --- a/update-manager/fota/fota-installer.c +++ b/update-manager/fota/fota-installer.c @@ -117,7 +117,8 @@ int fota_installer_execute(pid_t sender_pid) goto execute_destroy; } - if (g_str_has_prefix(buf, old_build_string) != TRUE) { + if (!g_str_has_prefix(buf, FOTA_DELTA_BUILD_STRING_FULL_DELTA_PREFIX) && + !g_str_has_prefix(buf, old_build_string)) { _FLOGI("The caller doesn't have appropriate delta(%s), delta build string(%s)", old_build_string, buf); status = -3; diff --git a/update-manager/fota/fota-manager.h b/update-manager/fota/fota-manager.h index cfda138..72d8d9d 100644 --- a/update-manager/fota/fota-manager.h +++ b/update-manager/fota/fota-manager.h @@ -21,6 +21,7 @@ #define FOTA_DELTA_BUILD_STRING_DIR "/tmp" #define FOTA_DELTA_BUILD_STRING_FILENAME "build_string.txt" #define FOTA_DELTA_BUILD_STRING_PATH FOTA_DELTA_BUILD_STRING_DIR "/" FOTA_DELTA_BUILD_STRING_FILENAME +#define FOTA_DELTA_BUILD_STRING_FULL_DELTA_PREFIX "0.0@" #define FOTA_STATUS_DIR "/opt/data/update" #define FOTA_STATUS_FLAG_PATH FOTA_STATUS_DIR "/is-first-boot-after-fota"