Bug 423715  - Really preserve legacy MD5 properties

Workflow to calculate checksums and store them in artifact's
properties assumes usage of two methods from
org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumUtilities:

- calculateChecksums(File, Map<String, String>, Collection<String>)
- checksumsToProperties(String, Map<String, String>)

Two users of these methods, PublisherHelper and
RecreateRepositoryApplication handled legacy MD5 properties in an
inconsistent way. Even more, RecreateRepositoryApplication effectively
ignored legacy MD5 property when recreating artifact descriptor.

Move logic to handle legacy MD5 properties from PublisherHelper and
RecreateRepositoryApplication to ChecksumUtilities'
checksumsToProperties(String, Map<String, String>).

p2 codebase has no tests for RecreateRepositoryApplication but PDE
Build does, specifically P2Tests' testBug265564. This time PDE Build
detected such regression [1], but it would be better to have some test
harness for RecreateRepositoryApplication in p2 itself and not rely on
downstream projects.

[1] Bug 531931

Change-Id: Ic651df754691c25ee824bb444eff251f64f0757a
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
4 files changed