From: Junghyun Yeon Date: Wed, 20 Feb 2019 08:24:42 +0000 (+0900) Subject: Add codes to handle ReadonlyUpdateInstalled pkg X-Git-Tag: submit/tizen/20190315.084013~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d548af7bc59450f6348fff8697e3ee4321292044;p=platform%2Fcore%2Fappfw%2Fpkgmgr-tool.git Add codes to handle ReadonlyUpdateInstalled pkg - When readonlyupdateinstalled pkg version is higher than FOTA-updated pkg, pkg version should be preserved. Change-Id: I48e5718dca83db7e2777f51c6750f4d44478a37a Signed-off-by: Junghyun Yeon --- diff --git a/src/pkg_upgrade.c b/src/pkg_upgrade.c index 566231b..e5d0782 100644 --- a/src/pkg_upgrade.c +++ b/src/pkg_upgrade.c @@ -377,6 +377,12 @@ static int __compare_pkgid(char *file_path, char *fota_pkgid, FREE_AND_NULL(version); FREE_AND_NULL(update); break; + } else if (compare == PMINFO_VERSION_OLD) { + ret = PKG_IS_OLD; + FREE_AND_NULL(pkgid); + FREE_AND_NULL(version); + FREE_AND_NULL(update); + break; } FREE_AND_NULL(pkgid); diff --git a/src/pkg_upgrade.h b/src/pkg_upgrade.h index 4f5a93f..de1e8de 100644 --- a/src/pkg_upgrade.h +++ b/src/pkg_upgrade.h @@ -92,7 +92,8 @@ typedef enum { PKG_IS_NOT_EXIST = 0, PKG_IS_SAME, PKG_IS_UPDATED, - PKG_IS_INSERTED + PKG_IS_INSERTED, + PKG_IS_OLD } COMPARE_RESULT; typedef enum {