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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7BFE215813A for ; Tue, 07 Jan 2025 17:26:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 571C5E079C; Tue, 07 Jan 2025 17:26:03 +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 DC316E03DF for ; Tue, 07 Jan 2025 17:26:02 +0000 (UTC) From: xgqt@gentoo.org To: gentoo-dev@lists.gentoo.org Cc: dotnet@gentoo.org, =?UTF-8?q?Maciej=20Bar=C4=87?= Subject: [gentoo-dev] [PATCH 1/2] eclass/dotnet-pkg-base.eclass: add DOTNET_VERBOSITY user variable Date: Tue, 7 Jan 2025 18:25:36 +0100 Message-ID: <20250107172550.62144-1-xgqt@gentoo.org> X-Mailer: git-send-email 2.45.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: ecea4fd3-5cf0-4d06-92ec-a9f3a4d29f75 X-Archives-Hash: 07db7b66fedc788b849b1d6738123cc8 From: Maciej Barć 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ć --- 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