From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CED9815838C for ; Wed, 31 Jan 2024 14:01:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 94033E2BAD; Wed, 31 Jan 2024 13:59:25 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7F07FE2BAD for ; Wed, 31 Jan 2024 13:59:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C3588343090 for ; Wed, 31 Jan 2024 13:59:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5CA52BC0 for ; Wed, 31 Jan 2024 13:59:23 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1706709559.541088baec1ffcb943426333891a88c8935c64a6.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/cargo.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 541088baec1ffcb943426333891a88c8935c64a6 X-VCS-Branch: master Date: Wed, 31 Jan 2024 13:59:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 890c6032-f495-4cc3-ae4c-6cd9a86dbf75 X-Archives-Hash: b19a1da34d0dfb3f784bfc89d04ae70e commit: 541088baec1ffcb943426333891a88c8935c64a6 Author: Michał Górny gentoo org> AuthorDate: Tue Jan 30 16:40:23 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Wed Jan 31 13:59:19 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=541088ba cargo.eclass: Output only the first crate URI when PKGBUMPING Modify cargo_set_crate_uris to output only the first crate URI when PKGBUMPING is set for the current ebuild. This makes pkgdiff-mg much faster on Rust packages, as it does not have to fetch all the hundreds of crates that aren't part of the diff anyway. This is an improved version of 92001837418f3a50e6571c0f533520b42f90d488, as the original attempted not to output any URIs, and therefore could create empty groups in SRC_URI that are invalid. Signed-off-by: Michał Górny gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/35097 Signed-off-by: Michał Górny gentoo.org> eclass/cargo.eclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index 3bdbb5e3ec64..0f2da982f60c 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -193,6 +193,11 @@ _cargo_set_crate_uris() { fi url="https://crates.io/api/v1/crates/${name}/${version}/download -> ${name}-${version}.crate" CARGO_CRATE_URIS+="${url} " + + # when invoked by pkgbump, avoid fetching all the crates + # we just output the first one, to avoid creating empty groups + # in SRC_URI + [[ ${PKGBUMPING} == ${PVR} ]] && return done if declare -p GIT_CRATES &>/dev/null; then