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 04:21:17 +0000 (21:21 -0700)
commit39c322cefcc0ecba76a2ffb8881694fd010a87fc
tree264efa97ad1345392b34ebd9e795e82250d59c2f
parent057831bc665b15d7beda970b91b2c332dee417f0
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: I77bae035e39f2e0be25f7f6d71c5882464e3d50f
(cherry picked from commit 84006eacd05e3f2784a0ecdf36609767f2c34044)
tools/releasetools/edify_generator.py
tools/releasetools/ota_from_target_files.py