tizen: sd_fusing.py: Exit if A/B update is requested on unsupported target
authorŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 4 Apr 2024 10:50:07 +0000 (12:50 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 28 Oct 2024 11:28:43 +0000 (20:28 +0900)
This error occurs if the target class improperly inherits from
SdFusingTarget instead of SdFusingTargetAB.

Change-Id: I83379fff92566d0036a868837e613a9a9cd94f7e
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
scripts/tizen/sd_fusing.py

index a3aea309affcdb76dcfe527984494a7ad7949121..a34c203b30f54d4f4223a913b566415dea0014c7 100755 (executable)
@@ -163,6 +163,11 @@ class SdFusingTarget:
         return binaries
 
     def get_partition_index(self, binary):
+        if hasattr(self, 'update'):
+            logging.error("You have requested to update the {} partition set. "
+                          "This target does not support A/B partition sets."
+                          .format(self.update.upper()))
+            sys.exit(1)
         return self.binaries.get(binary, None)
 
     params = ()