[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: challenge: Fix type mismatch when comparing to a local hash.
From: |
guix-commits |
Subject: |
01/04: challenge: Fix type mismatch when comparing to a local hash. |
Date: |
Sat, 14 Dec 2019 18:34:53 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 428561aa63e7ddcafdd80a50e2b147fc97f77662
Author: Ludovic Courtès <address@hidden>
Date: Sat Dec 14 14:59:32 2019 +0100
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 51e8d3e..ebeebd5 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))))