diff options
author | Ludovic Courtès <ludo@gnu.org> | 2024-09-05 12:04:00 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-09-06 11:46:23 +0200 |
commit | 0629af7c2a47171fe8699b4d45662e605fea2fa6 (patch) | |
tree | 10c43ff6cd5e4a5d39bb71d3e547934b236f68ef | |
parent | 9b5be575f4deed576ad810aef546a353d39532fa (diff) | |
download | guix-0629af7c2a47171fe8699b4d45662e605fea2fa6.tar.gz guix-0629af7c2a47171fe8699b4d45662e605fea2fa6.zip |
guix build: ‘--log-file’ honors the configured substitute URLs.
* guix/scripts/build.scm (guix-build): When defining ‘urls’, add
‘substitute-urls’ call.
* doc/guix.texi (Additional Build Options): Adjust ‘--log-file’
documentation.
Change-Id: I40f0647efe64ba3a63a6379b8da80b0da8910f48
-rw-r--r-- | doc/guix.texi | 2 | ||||
-rw-r--r-- | guix/scripts/build.scm | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index b384b21771..981ffb8c58 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13714,7 +13714,7 @@ guix build --log-file -e '(@@ (gnu packages guile) guile-2.0)' If a log is unavailable locally, and unless @option{--no-substitutes} is passed, the command looks for a corresponding log on one of the -substitute servers (as specified with @option{--substitute-urls}). +substitute servers. So for instance, imagine you want to see the build log of GDB on @code{aarch64}, but you are actually on an @code{x86_64} machine: diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index cd6b847a57..b010414d53 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -763,9 +763,11 @@ needed." (urls (map (cut string-append <> "/log") (if (assoc-ref opts 'substitutes?) (or (assoc-ref opts 'substitute-urls) - ;; XXX: This does not necessarily match the - ;; daemon's substitute URLs. - %default-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)) |