summaryrefslogtreecommitdiff
path: root/eclass/cargo.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-05 14:04:26 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-05 14:04:26 +0000
commit8fd9d385e5bc3c01115ec2ddcb2227607eb90861 (patch)
treeaba1e6ef6b95e94172c009394cd1fcbc383e7d6e /eclass/cargo.eclass
parent1ddcee0bd115d2f843f82061cb0d1741bf90151d (diff)
gentoo auto-resync : 05:01:2024 - 14:04:25
Diffstat (limited to 'eclass/cargo.eclass')
-rw-r--r--eclass/cargo.eclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 1e1a6e3ddfe2..7bdd548b0df8 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cargo.eclass
@@ -175,6 +175,9 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
# If no arguments are provided, it uses the CRATES variable.
# The value is set as CARGO_CRATE_URIS.
_cargo_set_crate_uris() {
+ # when called by pkgbump, do not fetch crates
+ [[ ${PKGBUMPING} == ${PVR} ]] && return
+
local -r regex='^([a-zA-Z0-9_\-]+)-([0-9]+\.[0-9]+\.[0-9]+.*)$'
local crates=${1}
local crate
@@ -331,6 +334,9 @@ cargo_src_unpack() {
for archive in ${A}; do
case "${archive}" in
*.crate)
+ # when called by pkgdiff-mg, do not unpack crates
+ [[ ${PKGBUMPING} == ${PVR} ]] && continue
+
ebegin "Loading ${archive} into Cargo registry"
tar -xf "${DISTDIR}"/${archive} -C "${ECARGO_VENDOR}/" || die
# generate sha256sum of the crate itself as cargo needs this