From d41c9179d24fde033f22c7a996dc88a62baa4951 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 31 Oct 2017 12:04:09 -0700 Subject: [PATCH] releasetools: Fix the wrong command when falling back to bsdiff. Commit b937ead5d9a208079372b70a149aff66c7a607e1 added the fallback to bsdiff on imgdiff failures. However, it missed setting the transfer style accordingly, which led to patch header mismatch. Bug: 68659848 Test: Generate an incremental that has the fallback from imgdiff to bsdiff. Examine the generated transfer list and verify that it has "bsdiff" for the fallback command. Change-Id: I55e46879d590a8af82ea796b9d98ffdb30360408 --- tools/releasetools/blockimgdiff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/releasetools/blockimgdiff.py b/tools/releasetools/blockimgdiff.py index c95512d27..c184c42d6 100644 --- a/tools/releasetools/blockimgdiff.py +++ b/tools/releasetools/blockimgdiff.py @@ -768,6 +768,7 @@ class BlockImageDiff(object): message.append( "Fell back and generated with bsdiff instead for %s" % ( xf.tgt_name,)) + xf.style = "bsdiff" with lock: warning_messages.extend(message) del message[:]