From: Mark Hatle Date: Thu, 6 Oct 2022 21:54:07 +0000 (-0500) Subject: insane.bbclass: Allow hashlib version that only accepts on parameter X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~2835 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2bbabed51e3aca138486d3feef640f5d3249be40;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Mark Hatle Signed-off-by: Mark Hatle Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index db34b4bdb58..dc46857a194 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -555,7 +555,10 @@ python populate_lic_qa_checksum() { import hashlib lineno = 0 license = [] - m = hashlib.new('MD5', usedforsecurity=False) + try: + m = hashlib.new('MD5', usedforsecurity=False) + except TypeError: + m = hashlib.new('MD5') for line in f: lineno += 1 if (lineno >= beginline):