* [gentoo-dev] [PATCH 1/2] eclass/dotnet-pkg-base.eclass: add DOTNET_VERBOSITY user variable
@ 2025-01-07 17:25 xgqt
2025-01-07 17:25 ` [gentoo-dev] [PATCH 2/2] dev-dotnet/dotnet-sdk: use DOTNET_VERBOSITY, like the dotnet-pkg-base eclass xgqt
0 siblings, 1 reply; 2+ messages in thread
From: xgqt @ 2025-01-07 17:25 UTC (permalink / raw
To: gentoo-dev; +Cc: dotnet, Maciej Barć
From: Maciej Barć <xgqt@gentoo.org>
DOTNET_VERBOSITY controls dotnet restore/build/test verbosity.
We allow the user to set this value to any other to value because it
might be helpful when debugging dotnet processes. On the other hand,
generally warnings and errors provide enough info for debugging package
emerge process.
Normally we use the default value - "minimal", that still reports what is
being built and any warnings/errors but it might come handy to set it
to a higher value for the Gentoo Tinderbox CI.
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
---
eclass/dotnet-pkg-base.eclass | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
index d9abff3859..b266c1b5df 100644
--- a/eclass/dotnet-pkg-base.eclass
+++ b/eclass/dotnet-pkg-base.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: dotnet-pkg-base.eclass
@@ -32,6 +32,23 @@ _DOTNET_PKG_BASE_ECLASS=1
inherit edo multiprocessing nuget
+# @ECLASS_VARIABLE: DOTNET_VERBOSITY
+# @USER_VARIABLE
+# @DESCRIPTION:
+# Controls verbosity of the dotnet restore/build/test processes.
+#
+# Defaults to "minimal" - this only reports which projects are being built
+# and warnings/errors, if any. All the possible values are: "quiet", "minimal",
+# "normal", "detailed" and "diagnostic". For more information on verbosity
+# levels, see the official .NET SDK documentation on:
+# * https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet
+# * https://learn.microsoft.com/en-us/dotnet/api/microsoft.build.framework.loggerverbosity
+#
+# This variable can be used to debug package build process (by selecting
+# anything above "minimal") but generally warnings/errors provide all
+# the necessary info.
+: "${DOTNET_VERBOSITY:=minimal}"
+
# @ECLASS_VARIABLE: DOTNET_PKG_COMPAT
# @REQUIRED
# @PRE_INHERIT
@@ -385,6 +402,7 @@ dotnet-pkg-base_restore() {
local -a restore_args=(
--runtime "${DOTNET_PKG_RUNTIME}"
--source "${NUGET_PACKAGES}"
+ --verbosity "${DOTNET_VERBOSITY}"
-maxCpuCount:$(makeopts_jobs)
"${@}"
)
@@ -407,6 +425,7 @@ dotnet-pkg-base_restore-tools() {
local -a tool_restore_args=(
--add-source "${NUGET_PACKAGES}"
+ --verbosity "${DOTNET_VERBOSITY}"
)
if [[ -n "${1}" ]] ; then
@@ -447,6 +466,7 @@ dotnet-pkg-base_build() {
--no-self-contained
--output "${DOTNET_PKG_OUTPUT}"
--runtime "${DOTNET_PKG_RUNTIME}"
+ --verbosity "${DOTNET_VERBOSITY}"
-maxCpuCount:$(makeopts_jobs)
)
@@ -482,6 +502,7 @@ dotnet-pkg-base_test() {
local -a test_args=(
--configuration "${DOTNET_PKG_CONFIGURATION}"
--no-restore
+ --verbosity "${DOTNET_VERBOSITY}"
-maxCpuCount:$(makeopts_jobs)
"${@}"
)
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-dev] [PATCH 2/2] dev-dotnet/dotnet-sdk: use DOTNET_VERBOSITY, like the dotnet-pkg-base eclass
2025-01-07 17:25 [gentoo-dev] [PATCH 1/2] eclass/dotnet-pkg-base.eclass: add DOTNET_VERBOSITY user variable xgqt
@ 2025-01-07 17:25 ` xgqt
0 siblings, 0 replies; 2+ messages in thread
From: xgqt @ 2025-01-07 17:25 UTC (permalink / raw
To: gentoo-dev; +Cc: dotnet, Maciej Barć
From: Maciej Barć <xgqt@gentoo.org>
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
---
dev-dotnet/dotnet-sdk/dotnet-sdk-8.0.107-r2.ebuild | 6 +++---
dev-dotnet/dotnet-sdk/dotnet-sdk-9.0.101.ebuild | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dev-dotnet/dotnet-sdk/dotnet-sdk-8.0.107-r2.ebuild b/dev-dotnet/dotnet-sdk/dotnet-sdk-8.0.107-r2.ebuild
index e275af4d57..6cb26506ce 100644
--- a/dev-dotnet/dotnet-sdk/dotnet-sdk-8.0.107-r2.ebuild
+++ b/dev-dotnet/dotnet-sdk/dotnet-sdk-8.0.107-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Pre-build (and distribution preparation)
@@ -15,7 +15,7 @@
# Build ("src_compile")
# To learn about arguments that are passed to the "build.sh" script see:
# https://github.com/dotnet/source-build/discussions/4082
-# User variable: GENTOO_DOTNET_BUILD_VERBOSITY - set other verbosity log level.
+# User variable: DOTNET_VERBOSITY - set other verbosity log level.
EAPI=8
@@ -199,7 +199,7 @@ src_compile() {
# The "source_repository" should always be the same.
local source_repository="https://github.com/dotnet/dotnet"
- local verbosity="${GENTOO_DOTNET_BUILD_VERBOSITY:-minimal}"
+ local verbosity="${DOTNET_VERBOSITY:-minimal}"
ebegin "Building the .NET SDK ${SDK_SLOT}"
local -a buildopts=(
diff --git a/dev-dotnet/dotnet-sdk/dotnet-sdk-9.0.101.ebuild b/dev-dotnet/dotnet-sdk/dotnet-sdk-9.0.101.ebuild
index d5bce67a81..5067599f96 100644
--- a/dev-dotnet/dotnet-sdk/dotnet-sdk-9.0.101.ebuild
+++ b/dev-dotnet/dotnet-sdk/dotnet-sdk-9.0.101.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Pre-build (and distribution preparation)
@@ -15,7 +15,7 @@
# Build ("src_compile")
# To learn about arguments that are passed to the "build.sh" script see:
# https://github.com/dotnet/source-build/discussions/4082
-# User variable: GENTOO_DOTNET_BUILD_VERBOSITY - set other verbosity log level.
+# User variable: DOTNET_VERBOSITY - set other verbosity log level.
EAPI=8
@@ -245,7 +245,7 @@ src_compile() {
# The "source_repository" should always be the same.
local source_repository="https://github.com/dotnet/dotnet"
- local verbosity="${GENTOO_DOTNET_BUILD_VERBOSITY:-minimal}"
+ local verbosity="${DOTNET_VERBOSITY:-minimal}"
ebegin "Building the .NET SDK ${SDK_SLOT}"
local -a buildopts=(
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-07 17:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 17:25 [gentoo-dev] [PATCH 1/2] eclass/dotnet-pkg-base.eclass: add DOTNET_VERBOSITY user variable xgqt
2025-01-07 17:25 ` [gentoo-dev] [PATCH 2/2] dev-dotnet/dotnet-sdk: use DOTNET_VERBOSITY, like the dotnet-pkg-base eclass xgqt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox