unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#45307] [PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install"
@ 2020-12-18  2:27 Zhu Zihao
       [not found] ` <handler.45307.B.160825848714001.ack@debbugs.gnu.org>
  2020-12-31 12:41 ` bug#45307: [PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install" Efraim Flashner
  0 siblings, 2 replies; 4+ messages in thread
From: Zhu Zihao @ 2020-12-18  2:27 UTC (permalink / raw)
  To: 45307


[-- Attachment #1.1: Type: text/plain, Size: 335 bytes --]


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.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-system-cargo-Use-argument-no-track-in-cargo-in.patch --]
[-- Type: text/x-patch, Size: 1278 bytes --]

From fadf6149f998758c1d663d3dbe1c6fe8a85e5700 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@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


[-- Attachment #3: Type: text/plain, Size: 100 bytes --]


-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#45307] Acknowledgement ([PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install")
       [not found] ` <handler.45307.B.160825848714001.ack@debbugs.gnu.org>
@ 2020-12-18  2:30   ` Zhu Zihao
  2020-12-31  9:50     ` Zhu Zihao
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Zihao @ 2020-12-18  2:30 UTC (permalink / raw)
  To: 45307

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]


I test the ripgrep and bat and it works for these two packages.
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#45307] Acknowledgement ([PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install")
  2020-12-18  2:30   ` [bug#45307] Acknowledgement ([PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install") Zhu Zihao
@ 2020-12-31  9:50     ` Zhu Zihao
  0 siblings, 0 replies; 4+ messages in thread
From: Zhu Zihao @ 2020-12-31  9:50 UTC (permalink / raw)
  To: 45307

[-- Attachment #1: Type: text/plain, Size: 129 bytes --]


Ping for response.

-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#45307: [PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install"
  2020-12-18  2:27 [bug#45307] [PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install" Zhu Zihao
       [not found] ` <handler.45307.B.160825848714001.ack@debbugs.gnu.org>
@ 2020-12-31 12:41 ` Efraim Flashner
  1 sibling, 0 replies; 4+ messages in thread
From: Efraim Flashner @ 2020-12-31 12:41 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: 45307-done

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

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@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-31 12:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-18  2:27 [bug#45307] [PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install" Zhu Zihao
     [not found] ` <handler.45307.B.160825848714001.ack@debbugs.gnu.org>
2020-12-18  2:30   ` [bug#45307] Acknowledgement ([PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install") Zhu Zihao
2020-12-31  9:50     ` Zhu Zihao
2020-12-31 12:41 ` bug#45307: [PATCH]: build-system/cargo: Use argument "--no-track" in "cargo install" Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).