GNU bug report logs - #77093
[PATCH rust-team 00/18] New Rust packaging workflow based on lockfile importer.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Tue, 18 Mar 2025 07:18:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Hilton Chain <hako <at> ultrarare.space>
To: 77093 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Efraim Flashner <efraim <at> flashner.co.il>, Divya Ranjan Pattanaik <divya <at> subvertising.org>, Efraim Flashner <efraim <at> flashner.co.il>, Steve George <steve <at> futurile.net>
Subject: [bug#77093] [PATCH rust-team v2 01/17] build/cargo: Pass ‘--offline’ to cargo.
Date: Tue, 18 Mar 2025 22:26:44 +0800
This will make error messages more helpful.

* guix/build/cargo-build-system.scm (build,check,package,install): Pass
‘--offline’ to cargo.

Change-Id: Ic95f603b793319f99c9c1fbce43f773bfc8126c0
---
 guix/build/cargo-build-system.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 5ef6b23abd..41f54f42b7 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -246,7 +246,7 @@ (define* (build #:key
   "Build a given Cargo package."
   (or skip-build?
       (apply invoke
-             `("cargo" "build"
+             `("cargo" "build" "--offline"
                ,@(if parallel-build?
                      (list "-j" (number->string (parallel-job-count)))
                      (list "-j" "1"))
@@ -264,7 +264,7 @@ (define* (check #:key
   "Run tests for a given Cargo package."
   (when tests?
     (apply invoke
-           `("cargo" "test"
+           `("cargo" "test" "--offline"
              ,@(if parallel-build?
                    (list "-j" (number->string (parallel-job-count)))
                    (list "-j" "1"))
@@ -303,7 +303,7 @@ (define* (package #:key
         ;;error: invalid inclusion of reserved file name Cargo.toml.orig in package source
         (when (file-exists? "Cargo.toml.orig")
           (delete-file "Cargo.toml.orig"))
-        (apply invoke `("cargo" "package" ,@cargo-package-flags))
+        (apply invoke `("cargo" "package" "--offline" ,@cargo-package-flags))
 
         ;; Then unpack the crate, reset the timestamp of all contained files, and
         ;; repack them.  This is necessary to ensure that they are reproducible.
@@ -356,7 +356,8 @@ (define* (install #:key
     ;; otherwise cargo will raise an error.
     (or skip-build?
         (not (has-executable-target?))
-        (invoke "cargo" "install" "--no-track" "--path" "." "--root" out
+        (invoke "cargo" "install" "--offline" "--no-track"
+                "--path" "." "--root" out
                 "--features" (string-join features)))
 
     (when install-source?
-- 
2.48.1





This bug report was last modified 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.