mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-13 10:30:43 +02:00
guix build: Avoid “could not determine …” warning when unnecessary.
This is a followup to 0629af7c2a
.
* guix/scripts/build.scm (guix-build): Move ‘urls’ definition
to (assoc-ref opts 'log-file?) case so that the “could not determine
current substitute URLs” warning is not displayed when ‘urls’ is unused.
Change-Id: I9434621b00a80bdbcf54d2a46d1a1e5f49cc7669
This commit is contained in:
parent
943b38a0c3
commit
40a0b440ba
1 changed files with 13 additions and 13 deletions
|
@ -760,15 +760,6 @@ needed."
|
|||
(%graft? graft?))
|
||||
(let* ((mode (assoc-ref opts 'build-mode))
|
||||
(drv (options->derivations store opts))
|
||||
(urls (map (cut string-append <> "/log")
|
||||
(if (assoc-ref opts 'substitutes?)
|
||||
(or (assoc-ref opts 'substitute-urls)
|
||||
(substitute-urls store)
|
||||
(begin
|
||||
(warning (G_ "could not determine current \
|
||||
substitute URLs; using defaults~%"))
|
||||
%default-substitute-urls))
|
||||
'())))
|
||||
(items (filter-map (match-lambda
|
||||
(('argument . (? store-path? file))
|
||||
;; If FILE is a .drv that's not in
|
||||
|
@ -791,10 +782,19 @@ substitute URLs; using defaults~%"))
|
|||
;; Pass 'show-build-log' the output file names, not the
|
||||
;; derivation file names, because there can be several
|
||||
;; derivations leading to the same output.
|
||||
(for-each (cut show-build-log store <> urls)
|
||||
(delete-duplicates
|
||||
(append (map derivation->output-path drv)
|
||||
items))))
|
||||
(let ((urls (map (cut string-append <> "/log")
|
||||
(if (assoc-ref opts 'substitutes?)
|
||||
(or (assoc-ref opts 'substitute-urls)
|
||||
(substitute-urls store)
|
||||
(begin
|
||||
(warning (G_ "\
|
||||
could not determine current substitute URLs; using defaults~%"))
|
||||
%default-substitute-urls))
|
||||
'()))))
|
||||
(for-each (cut show-build-log store <> urls)
|
||||
(delete-duplicates
|
||||
(append (map derivation->output-path drv)
|
||||
items)))))
|
||||
((assoc-ref opts 'derivations-only?)
|
||||
(format #t "~{~a~%~}" (map derivation-file-name drv))
|
||||
(for-each (cut register-root store <> <>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue