tizen: sd_fusing.py: Exit if A/B update is requested on unsupported target 83/309083/2
authorŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 4 Apr 2024 10:50:07 +0000 (12:50 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 4 Apr 2024 11:47:49 +0000 (11:47 +0000)
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 a3aea30..a34c203 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 = ()