mirror of
https://codeberg.org/guix/guix.git
synced 2026-04-28 06:34:05 +00:00
store: Make derivation-path? use direct-store-path?.
* guix/store.scm (derivation-path?): Use direct-store-path? instead of store-path?. * tests/store.scm (derivation-path?): New test. Change-Id: Ib54b9e2045f19f26039cf072eeb79dab8f0195be Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #6192
This commit is contained in:
committed by
Ludovic Courtès
parent
afcfe2bc3c
commit
a06c9b0ff7
@@ -1980,7 +1980,7 @@ valid inputs."
|
||||
|
||||
(define (derivation-path? path)
|
||||
"Return #t if PATH is a derivation path."
|
||||
(and (store-path? path) (string-suffix? ".drv" path)))
|
||||
(and (direct-store-path? path) (string-suffix? ".drv" path)))
|
||||
|
||||
(define (store-path-base path)
|
||||
"Return the base path of a path in the store."
|
||||
|
||||
@@ -109,6 +109,18 @@
|
||||
"/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7/bin/guile")))
|
||||
(not (direct-store-path? (%store-prefix)))))
|
||||
|
||||
(test-assert "derivation-path?"
|
||||
(and (derivation-path?
|
||||
(string-append (%store-prefix)
|
||||
"/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7.drv"))
|
||||
(not (derivation-path?
|
||||
(string-append (%store-prefix)
|
||||
"/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
|
||||
(not (derivation-path?
|
||||
(string-append
|
||||
(%store-prefix)
|
||||
"/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7/guile.drv")))))
|
||||
|
||||
(test-skip (if %store 0 18))
|
||||
|
||||
(test-equal "substitute-urls, default"
|
||||
|
||||
Reference in New Issue
Block a user