aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-03-02 11:25:50 -0500
committerXavier Claessens <xclaesse@gmail.com>2021-03-02 12:38:46 -0500
commitb7bcdb7839f7c2ac53f540235ec44c6ba8e344d7 (patch)
tree109570e8efbf6911d8e8bd322d9fba4f7da7854a
parent25848fc05f69a54f63bc816486283a2e74d842a8 (diff)
downloadmeson-b7bcdb7839f7c2ac53f540235ec44c6ba8e344d7.zip
meson-b7bcdb7839f7c2ac53f540235ec44c6ba8e344d7.tar.gz
meson-b7bcdb7839f7c2ac53f540235ec44c6ba8e344d7.tar.bz2
wrap: sha256 digest is not case sensitive
Fixes: #8450.
-rw-r--r--mesonbuild/wrap/wrap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index cce44a8..7ec8b50 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -512,7 +512,7 @@ class Resolver:
def check_hash(self, what: str, path: str, hash_required: bool = True) -> None:
if what + '_hash' not in self.wrap.values and not hash_required:
return
- expected = self.wrap.get(what + '_hash')
+ expected = self.wrap.get(what + '_hash').lower()
h = hashlib.sha256()
with open(path, 'rb') as f:
h.update(f.read())
@@ -526,7 +526,7 @@ class Resolver:
mlog.log('Downloading', mlog.bold(self.packagename), what, 'from', mlog.bold(srcurl))
try:
dhash, tmpfile = self.get_data(srcurl)
- expected = self.wrap.get(what + '_hash')
+ expected = self.wrap.get(what + '_hash').lower()
if dhash != expected:
os.remove(tmpfile)
raise WrapException('Incorrect hash for {}:\n {} expected\n {} actual.'.format(what, expected, dhash))