commit:     4bf5c8c63455def273c2c27006a1363d23515eb8
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 26 19:22:16 2026 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Thu Mar 12 15:21:00 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bf5c8c6

cargo.eclass: avoid useless use of assert / pipestatus

The preceding command pipeline is `printf | xargs`, and printf is a bash
builtin. It cannot fail. `die`ing if xargs fails to consume the pipe
buffer is sufficient.

assert is banned in EAPI 9, so it needs to go regardless. There's no
point to using `inherit eapi9-pipestatus` here.

Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 eclass/cargo.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 76d3b9a61a64..6f6062082968 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -529,8 +529,7 @@ cargo_src_unpack() {
                ebegin "Unpacking crates"
                printf '%s\0' "${crates[@]}" |
                        xargs -0 -P "$(makeopts_jobs)" -n 1 -t -- \
-                               tar -x -C "${ECARGO_VENDOR}" -f
-               assert
+                               tar -x -C "${ECARGO_VENDOR}" -f || die
                eend $?
 
                while read -d '' -r shasum archive; do
@@ -556,6 +555,7 @@ cargo_src_unpack() {
                        eqawarn "a crate tarball instead and fetch it via 
SRC_URI.  You can use"
                        eqawarn "'pycargoebuild --crate-tarball' to create one."
                fi
+               einfo "this package uses ${#crates[@]} number of crates: you 
are all good"
        fi
 
        cargo_gen_config

Reply via email to