core/legal-info: use hash file from version sub-dir
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 16 Jul 2017 17:22:39 +0000 (19:22 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 29 Jul 2017 20:34:41 +0000 (22:34 +0200)
commit63eeb9a383991b9ac92b524b63ac87f7b4657699
tree4ae3133c650ac5579c42a234b30de723e482a7fb
parentc58208642483e1455112d3ba5fea7458388681c6
core/legal-info: use hash file from version sub-dir

When we have multiple versions for a package, and the licensing terms
depend on the version actually selected (e.g. like Qt5), storing the
hashes for those license files in the .hash file is broken: the infra
will ensure that all hashes for a file do match, which would not be the
case here.

We fix that by first looking for a hash file in the version sub-dir
first, and if that does not exist, then we use the main hash file.

Drop the useless intermediate variable 'ret'.

Update the documentation accordingly.

Reported-by: Joshua Henderson <joshua.henderson@microchip.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Joshua Henderson <joshua.henderson@microchip.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
docs/manual/adding-packages-directory.txt
package/pkg-utils.mk