From 428561aa63e7ddcafdd80a50e2b147fc97f77662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 14 Dec 2019 14:59:32 +0100 Subject: [PATCH] challenge: Fix type mismatch when comparing to a local hash. * guix/scripts/challenge.scm (call-with-mismatches)[narinfo1]: When LOCAL-HASH is true, call 'narinfo-hash->sha256' and use 'bytevector=?' instead of 'string=?'. --- guix/scripts/challenge.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm index 51e8d3e4e3..ebeebd5cbe 100644 --- a/guix/scripts/challenge.scm +++ b/guix/scripts/challenge.scm @@ -321,8 +321,9 @@ specified in COMPARISON-REPORT." (define narinfo1 (if local-hash (find (lambda (narinfo) - (not (string=? (narinfo-hash narinfo) - local-hash))) + (not (bytevector=? (narinfo-hash->sha256 + (narinfo-hash narinfo)) + local-hash))) narinfos) (first (comparison-report-narinfos comparison-report))))