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 B3BED158089 for ; Thu, 5 Oct 2023 19:12:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6F702BC0C9; Thu, 5 Oct 2023 19:11:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 872292BC0C6 for ; Thu, 5 Oct 2023 19:11:12 +0000 (UTC) From: =?UTF-8?q?Maciej=20Bar=C4=87?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Maciej=20Bar=C4=87?= Subject: [gentoo-dev] [PATCH 4/4] eclass/nuget.eclass: partition dotnet-pkg_src_unpack Date: Thu, 5 Oct 2023 21:10:18 +0200 Message-ID: <20231005191025.12504-4-xgqt@gentoo.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231005191025.12504-1-xgqt@gentoo.org> References: <20231005191025.12504-1-xgqt@gentoo.org> 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: c6a01acb-6f90-4372-898c-c3f3788018ce X-Archives-Hash: 8ca6acfe95852ec477a4fae094cc9e44 This enables easier usage of "nuget_link-nuget-archives" in some special cases. Signed-off-by: Maciej Barć --- eclass/dotnet-pkg.eclass | 14 ++----------- eclass/nuget.eclass | 45 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/eclass/dotnet-pkg.eclass b/eclass/dotnet-pkg.eclass index 201daf1ec..b4f0c053d 100644 --- a/eclass/dotnet-pkg.eclass +++ b/eclass/dotnet-pkg.eclass @@ -136,18 +136,8 @@ dotnet-pkg_pkg_setup() { # copied into the "NUGET_PACKAGES" directory. dotnet-pkg_src_unpack() { nuget_link-system-nugets - - local archive - for archive in ${A} ; do - case "${archive}" in - *.nupkg ) - nuget_link "${DISTDIR}/${archive}" - ;; - * ) - unpack "${archive}" - ;; - esac - done + nuget_link-nuget-archives + nuget_unpack-non-nuget-archives } # @FUNCTION: dotnet-pkg_src_prepare diff --git a/eclass/nuget.eclass b/eclass/nuget.eclass index 445dcdccd..669e21300 100644 --- a/eclass/nuget.eclass +++ b/eclass/nuget.eclass @@ -181,6 +181,51 @@ nuget_link-system-nugets() { done } +# @FUNCTION: nuget_link-nuget-archives +# @DESCRIPTION: +# Link NuGet packages from package source files to the "NUGET_PACKAGES" +# directory. +# +# This is a complementary function to "nuget_unpack-non-nuget-archives". +# +# This function is used inside "dotnet-pkg_src_unpack" +# from the "dotnet-pkg" eclass. +nuget_link-nuget-archives() { + local archive + for archive in ${A} ; do + case "${archive}" in + *.nupkg ) + nuget_link "${DISTDIR}/${archive}" + ;; + * ) + : + ;; + esac + done +} + +# @FUNCTION: nuget_unpack-non-nuget-archives +# @DESCRIPTION: +# Unpack all from package source files that are not NuGet packages. +# +# This is a complementary function to "nuget_link-nuget-archives". +# +# This function is used inside "dotnet-pkg_src_unpack" +# from the "dotnet-pkg" eclass. +nuget_unpack-non-nuget-archives() { + local archive + for archive in ${A} ; do + case "${archive}" in + *.nupkg ) + : + ;; + * ) + unpack "${archive}" + ;; + esac + done +} + # @FUNCTION: nuget_donuget # @USAGE: ... # @DESCRIPTION: -- 2.41.0