Remove installed ISU package if the new Tizen does not contain it 44/299444/3 accepted/tizen/unified/20231004.100253
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Thu, 28 Sep 2023 14:02:35 +0000 (16:02 +0200)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Fri, 29 Sep 2023 07:38:52 +0000 (09:38 +0200)
Change-Id: I60f957afb64c438ab99fff52272a83a4e6841e2c

packaging/upgrade.spec
scripts/rw-upgrade/update.sh.in

index 023c44e..52563e3 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:          upgrade
 Summary:       Upgrade support for Tizen
-Version:       8.0.2
+Version:       8.0.3
 Release:       0
 Group:         System
 License:       Apache-2.0
index d3ed298..401b38c 100644 (file)
@@ -126,9 +126,11 @@ REMOVE_UNNECESSARY_ISU_PKGS()
                fi
        fi
 
-       for ISUCFG in $(find /etc/isu/ -type f -name isu.cfg); do
+       for ISUCFG in $(find /opt/isu/ -maxdepth 2 -type f -name isu.cfg); do
                PKG_NAME=$(basename "$(dirname "$ISUCFG")")
-               if [ ! -d "/opt/isu/$PKG_NAME" ]; then
+               if [ ! -d "/etc/isu/$PKG_NAME" ]; then
+                       NOTIFY "Platform image does not contain information about ${PKG_NAME} - unable to verify which is newer (ISU or Platform). Dropping ISU package ${PKG_NAME}."
+                       REMOVE_ISU_PKG "$PKG_NAME"
                        continue
                fi
                CUR_IMG_VERSION=$(grep -e "^version" "/etc/isu/$PKG_NAME/isu.cfg" | awk -F "=" '{ gsub(/[ ]+/, ""); print $2}')