OSDN Git Service

releasetools: Fix the bug in symlink deletion.
authorTao Bao <tbao@google.com>
Wed, 2 Sep 2015 17:28:08 +0000 (10:28 -0700)
committerTao Bao <tbao@google.com>
Thu, 3 Sep 2015 00:51:16 +0000 (17:51 -0700)
commit84006eacd05e3f2784a0ecdf36609767f2c34044
treef38cb7aedf180be030467e97a2f60fbe70acaa99
parente4c753f428ff404f10ec1bf170ea18ed2687dc07
releasetools: Fix the bug in symlink deletion.

For file-based OTAs, symlinks in the source build but not in the target
build will be deleted. However, if a symlink is replaced by a regular
file in the target build, the file will be accidentally deleted when
applying (resuming) the same package again.

Verify the checksum of a symlink that will be unpacked or renamed to.
Delete the file only if it doesn't have the target checksum.

Bug: 23646151
Change-Id: Ie322abb6022b6fa812c6b36a3127872d9614fc3b
tools/releasetools/edify_generator.py
tools/releasetools/ota_from_target_files.py