Gentoo Archives: gentoo-dev

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] cargo.eclass: use verbose cargo invocations
Date: Fri, 06 Dec 2019 23:44:49
Message-Id: 20191206234438.63218eb2@sf
In Reply to: [gentoo-dev] [PATCH] cargo.eclass: use verbose cargo invocations by Georgy Yakovlev
1 On Fri, 6 Dec 2019 12:09:31 -0800
2 Georgy Yakovlev <gyakovlev@g.o> wrote:
3
4 > Default output just prints crate name.
5 > With -vv we can see all cargo options and rustc args.
6 >
7 > Signed-off-by: Georgy Yakovlev <gyakovlev@g.o>
8 > ---
9
10 Looks good!
11
12 I had to do an equivalent locally at least a few times.
13
14 While at it I also suggest adding equivalent of
15 econf's/emake's ${EXTRA_ECONF} and ${EXTRA_EMAKE}
16 to allow users to inject arbitrary stuff. For example
17 to sneak in '-Z' options globally.
18
19 Say, ${CARGO_BUILD_EXTRA}, ${CARGO_INSTALL_EXTRA},
20 ${CARGO_TEST_EXTRA}.
21
22 > eclass/cargo.eclass | 6 +++---
23 > 1 file changed, 3 insertions(+), 3 deletions(-)
24 >
25 > diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
26 > index 5b6d1f050f1..13dd5c355fb 100644
27 > --- a/eclass/cargo.eclass
28 > +++ b/eclass/cargo.eclass
29 > @@ -146,7 +146,7 @@ cargo_src_compile() {
30 >
31 > export CARGO_HOME="${ECARGO_HOME}"
32 >
33 > - cargo build -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
34 > + cargo build -vv -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
35 > || die "cargo build failed"
36 > }
37 >
38 > @@ -156,7 +156,7 @@ cargo_src_compile() {
39 > cargo_src_install() {
40 > debug-print-function ${FUNCNAME} "$@"
41 >
42 > - cargo install -j $(makeopts_jobs) --root="${ED}/usr" $(usex debug --debug "") "$@" \
43 > + cargo install -vv -j $(makeopts_jobs) --root="${ED}/usr" $(usex debug --debug "") "$@" \
44 > || die "cargo install failed"
45 > rm -f "${ED}/usr/.crates.toml"
46 >
47 > @@ -169,7 +169,7 @@ cargo_src_install() {
48 > cargo_src_test() {
49 > debug-print-function ${FUNCNAME} "$@"
50 >
51 > - cargo test -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
52 > + cargo test -vv -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
53 > || die "cargo test failed"
54 > }
55 >
56 > --
57 > 2.23.0
58 >
59 >
60
61
62 --
63
64 Sergei

Replies

Subject Author
Re: [gentoo-dev] [PATCH] cargo.eclass: use verbose cargo invocations Georgy Yakovlev <gyakovlev@g.o>