insane.bbclass: Allow hashlib version that only accepts on parameter
PATCH 1/1 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 <[email protected]>
Signed-off-by Mark Hatle <[email protected]>
---
This was found on an internal Ubuntu 18.04 container. Unfortunately I don't have access to the container itself but this resolves the issue.
meta/classes-global/insane.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes-global/insane.bbclass +4 -1
@@ -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):
Signature · 1 line
2.17.1