]> code.ossystems Code Review - openembedded-core.git/commit
insane: improve license checksumming logic
authorRoss Burton <ross.burton@intel.com>
Thu, 21 Mar 2019 12:30:42 +0000 (12:30 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 24 Mar 2019 16:59:43 +0000 (16:59 +0000)
commit63ef9d342277c4ba541b78cbb45ef181f071f495
treea6d0c73744f21cc480145f431d03566e3193085e
parent91e3b2a762124bf5cf923654ef3a7c871b84c82f
insane: improve license checksumming logic

Instead of opening files as bytes and battling decoding to UTF-8 which can throw
exceptions, open directly as strings and replace invalid codepoints.  This
handles licenses in encodings which are not UTF-8 but are based on ASCII much
better.

Also instead of extracting the license lines, writing them to a file, and then
hashing the file, hash the lines directly.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass