CreatePatch.py: Fix call to legacy version of ss_bsdiff 15/286415/1
authorAntoni Adaszkiewicz <a.adaszkiewi@samsung.com>
Thu, 5 Jan 2023 11:05:45 +0000 (12:05 +0100)
committerAntoni Adaszkiewicz <a.adaszkiewi@samsung.com>
Thu, 5 Jan 2023 11:05:45 +0000 (12:05 +0100)
Change-Id: I65d7976b92a9e64b8a26b3634d04e5814ca2645f

mk_delta/common/bin/CreatePatch.py

index 57acceb..0ad6df1 100755 (executable)
@@ -64,7 +64,6 @@ EMPTY = ""
 PARENT_DIR = ".."
 MEM_REQ = 0
 MEM_FILE = "NULL"
-COMPRESSION_BROTLI = "brotli"
 
 SUPPORT_RENAME = "TRUE"
 
@@ -758,7 +757,7 @@ def update_cfg_file(DELTA_BIN, UPDATE_CFG_PATH):
                                f.write(line)
 
 
-def generate_delta_image(args, COMPRESSION_METHOD):
+def generate_delta_image(args):
        #for sizes
        oldsize_d = os.path.getsize(args.BASE_OLD)
        newsize_d = os.path.getsize(args.BASE_NEW)
@@ -783,7 +782,7 @@ def generate_delta_image(args, COMPRESSION_METHOD):
 
        patchLoc = '%s/%s' % (args.OUT_DIR, DELTA)
        logging.info('Make DELTA_IMAGE type delta %s <--> %s ==> %s %s' % (args.BASE_OLD, args.BASE_NEW, args.PART_NAME, patchLoc))
-       subprocess.call([DIFF_UTIL, "-c", COMPRESSION_METHOD, args.BASE_OLD, args.BASE_NEW, patchLoc])
+       subprocess.call([DIFF_UTIL, args.BASE_OLD, args.BASE_NEW, patchLoc])
 
 
 def generate_full_image(args):
@@ -891,9 +890,7 @@ def main():
                if UPDATE_TYPE_S == FULL_IMAGE:
                        generate_full_image(args)
                elif UPDATE_TYPE_S == DELTA_IMAGE:
-                       # generating LZMA deltas is supported by underlying software but it would require at least some kind of format autodetection mechanism, 
-                       # which is not available currently. Disable for now.
-                       generate_delta_image(args, COMPRESSION_BROTLI)
+                       generate_delta_image(args)
                else:
                        generate_delta_fs(args)