You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-packaging/8690145.patch

35 lines
1.6 KiB

From 8690145a30cb049b0d2bcc9288b388cb9f8bbda7 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: May 19 2023 17:33:11 +0000
Subject: cargo_license / cargo_license_summary: add "-Z avoid-dev-deps" arg
Without this flag, the "cargo tree" command attempts to resolve
dev-dependencies, even though the "no-dev" edge type is specified,
but dev-dependencies might not be present in the environment if the
package is being built with the check %bcond disabled.
---
diff --git a/macros.d/macros.cargo b/macros.d/macros.cargo
index 3785ea0..672ae06 100644
--- a/macros.d/macros.cargo
+++ b/macros.d/macros.cargo
@@ -183,6 +183,7 @@ fi \
%cargo_license(naf:)\
%{shrink:\
%{__cargo} tree \
+ -Z avoid-dev-deps \
--workspace \
--offline \
--edges no-build,no-dev,no-proc-macro \
@@ -204,6 +205,7 @@ fi \
%cargo_license_summary(naf:)\
%{shrink:\
%{__cargo} tree \
+ -Z avoid-dev-deps \
--workspace \
--offline \
--edges no-build,no-dev,no-proc-macro \