summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@kernel.crashing.org>2022-10-06 16:54:07 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-25 13:42:03 +0100
commit5f6076803027b00b182f496a59c8c9006fc27e90 (patch)
tree2e75152f80d3899da754e1d33542b4c80a1b38dd /meta
parent1582d7d3e9eaa14075f5c524774f0a65e7692c28 (diff)
downloadpoky-5f6076803027b00b182f496a59c8c9006fc27e90.tar.gz
insane.bbclass: Allow hashlib version that only accepts on parameter
Some versions of hashlib don't appear to implement the second FIPS related argument. Detect this and support both versions. (From OE-Core rev: 2bbabed51e3aca138486d3feef640f5d3249be40) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-global/insane.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index db34b4bdb5..dc46857a19 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -555,7 +555,10 @@ python populate_lic_qa_checksum() {
555 import hashlib 555 import hashlib
556 lineno = 0 556 lineno = 0
557 license = [] 557 license = []
558 m = hashlib.new('MD5', usedforsecurity=False) 558 try:
559 m = hashlib.new('MD5', usedforsecurity=False)
560 except TypeError:
561 m = hashlib.new('MD5')
559 for line in f: 562 for line in f:
560 lineno += 1 563 lineno += 1
561 if (lineno >= beginline): 564 if (lineno >= beginline):