GNU bug report logs - #45307
[PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install"

Previous Next

Package: guix-patches;

Reported by: Zhu Zihao <all_but_last <at> 163.com>

Date: Fri, 18 Dec 2020 02:29:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45307 in the body.
You can then email your comments to 45307 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#45307; Package guix-patches. (Fri, 18 Dec 2020 02:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zhu Zihao <all_but_last <at> 163.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 18 Dec 2020 02:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: guix-patches <at> gnu.org
Subject: [PATCH]: build-system/cargo: Use argument "--no-track" in "cargo
 install"
Date: Fri, 18 Dec 2020 10:27:39 +0800
[Message part 1 (text/plain, inline)]
After we update rust to rust-1.45, cargo install now create
.crates2.json instead of .crates.toml. So the hack we use in
c1cc0c4865a8bfff43c5c9bd6ae8dcadb061c8a0 doesn't work.

I checked the ArchLinux Rust packaging guideline and found that we
should use --no-track in "cargo install" to prevent cargo install these
files to prefix.

[signature.asc (application/pgp-signature, inline)]
[0001-build-system-cargo-Use-argument-no-track-in-cargo-in.patch (text/x-patch, inline)]
From fadf6149f998758c1d663d3dbe1c6fe8a85e5700 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last <at> 163.com>
Date: Fri, 18 Dec 2020 10:13:48 +0800
Subject: [PATCH] build-system/cargo: Use argument "--no-track" in "cargo
 install"

Prevent cargo install .crates.toml or .crates2.json to prefix.

* guix/build/cargo-build-system(install):
Add argument "--no-track" in "cargo install".
Remove stale hack.
---
 guix/build/cargo-build-system.scm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index c7beffc6e4..1d21b33895 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -183,13 +183,9 @@ directory = '" port)
     ;; otherwise cargo will raise an error.
     (or skip-build?
         (not (has-executable-target?))
-        (invoke "cargo" "install" "--path" "." "--root" out
+        (invoke "cargo" "install" "--no-track" "--path" "." "--root" out
                 "--features" (string-join features)))
 
-    ;; This is a file which we definitely don't need installed.
-    (when (file-exists? (string-append out "/.crates.toml"))
-      (delete-file (string-append out "/.crates.toml")))
-
     #t))
 
 (define %standard-phases
-- 
2.29.2

[Message part 4 (text/plain, inline)]
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

Information forwarded to guix-patches <at> gnu.org:
bug#45307; Package guix-patches. (Fri, 18 Dec 2020 02:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 45307 <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: 45307 <at> debbugs.gnu.org
Subject: Re: bug#45307: Acknowledgement ([PATCH]: build-system/cargo: Use
 argument "--no-track" in "cargo install")
Date: Fri, 18 Dec 2020 10:30:12 +0800
[Message part 1 (text/plain, inline)]
I test the ripgrep and bat and it works for these two packages.
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#45307; Package guix-patches. (Thu, 31 Dec 2020 09:52:01 GMT) Full text and rfc822 format available.

Message #11 received at 45307 <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: 45307 <at> debbugs.gnu.org
Subject: Re: bug#45307: Acknowledgement ([PATCH]: build-system/cargo: Use
 argument "--no-track" in "cargo install")
Date: Thu, 31 Dec 2020 17:50:44 +0800
[Message part 1 (text/plain, inline)]
Ping for response.

-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
[signature.asc (application/pgp-signature, inline)]

Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Thu, 31 Dec 2020 12:51:03 GMT) Full text and rfc822 format available.

Notification sent to Zhu Zihao <all_but_last <at> 163.com>:
bug acknowledged by developer. (Thu, 31 Dec 2020 12:51:03 GMT) Full text and rfc822 format available.

Message #16 received at 45307-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Zhu Zihao <all_but_last <at> 163.com>
Cc: 45307-done <at> debbugs.gnu.org
Subject: Re: [bug#45307] [PATCH]: build-system/cargo: Use argument
 "--no-track" in "cargo install"
Date: Thu, 31 Dec 2020 14:41:30 +0200
[Message part 1 (text/plain, inline)]
On Fri, Dec 18, 2020 at 10:27:39AM +0800, Zhu Zihao wrote:
> 
> After we update rust to rust-1.45, cargo install now create
> .crates2.json instead of .crates.toml. So the hack we use in
> c1cc0c4865a8bfff43c5c9bd6ae8dcadb061c8a0 doesn't work.
> 
> I checked the ArchLinux Rust packaging guideline and found that we
> should use --no-track in "cargo install" to prevent cargo install these
> files to prefix.
> 

I remember looking at that too after watching the archconf video. Thanks
for turning it into a patch. Patch pushed!


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 29 Jan 2021 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 86 days ago.

Previous Next


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