[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: store: 'store-path-hash-part' really returns false for invalid fi
From: |
guix-commits |
Subject: |
01/08: store: 'store-path-hash-part' really returns false for invalid file names. |
Date: |
Thu, 4 Feb 2021 03:44:13 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 814ee99da89a0bcc6cf53d61763d345ed95e067c
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Feb 3 14:43:29 2021 +0100
store: 'store-path-hash-part' really returns false for invalid file names.
The "store-path-hash-part #f", due to a SRFI-64 bug, was marked as
successful even though 'store-path-hash-part' was throwing an exception.
* guix/store.scm (store-path-hash-part): Really return #f.
---
guix/store.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/guix/store.scm b/guix/store.scm
index e0b15ab..81bb9eb 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -2173,10 +2173,12 @@ valid inputs."
(define (store-path-hash-part path)
"Return the hash part of PATH as a base32 string, or #f if PATH is not a
syntactically valid store path."
- (let* ((base (store-path-base path))
- (hash (string-take base 32)))
- (and (string-every %nix-base32-charset hash)
- hash)))
+ (match (store-path-base path)
+ (#f #f)
+ (base
+ (let ((hash (string-take base 32)))
+ (and (string-every %nix-base32-charset hash)
+ hash)))))
(define (derivation-log-file drv)
"Return the build log file for DRV, a derivation file name, or #f if it
- branch master updated (8e7e414 -> eae865c), guix-commits, 2021/02/04
- 02/08: channels: Record 'guix' channel metadata in (guix config)., guix-commits, 2021/02/04
- 05/08: channels: Consider the current channel commit as authentic., guix-commits, 2021/02/04
- 04/08: gnu: guix: Pass the '--with-channel-commit' configure flag., guix-commits, 2021/02/04
- 07/08: gnu: guile2.2-picture-language: Use the 2.2 dependencies., guix-commits, 2021/02/04
- 06/08: gnu: iproute2: Update to 5.10.0., guix-commits, 2021/02/04
- 08/08: gnu: guile-cairo: Update to 1.11.2., guix-commits, 2021/02/04
- 03/08: build: Add '--with-channel-commit' and related configure flags., guix-commits, 2021/02/04
- 01/08: store: 'store-path-hash-part' really returns false for invalid file names.,
guix-commits <=