summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-12-14 14:59:32 +0100
committerLudovic Courtès <ludo@gnu.org>2019-12-15 00:34:05 +0100
commit428561aa63e7ddcafdd80a50e2b147fc97f77662 (patch)
tree3277a2d2c0a1f71d129a6792f4f088979efcab57 /guix/scripts
parent9d97a11f04548b8b4f9865b4fa4173a119aa9985 (diff)
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=?'.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/challenge.scm5
1 files 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))))