releasetools: Fix the wrong command when falling back to bsdiff.

Commit b937ead5d9 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
This commit is contained in:
Tao Bao 2017-10-31 12:04:09 -07:00
parent 8b664d0d96
commit d41c9179d2
1 changed files with 1 additions and 0 deletions

View File

@ -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[:]