From: "Maciej Barć" <xgqt@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Maciej Barć" <xgqt@gentoo.org>
Subject: [gentoo-dev] [PATCH 4/4] eclass/nuget.eclass: partition dotnet-pkg_src_unpack
Date: Thu, 5 Oct 2023 21:10:18 +0200 [thread overview]
Message-ID: <20231005191025.12504-4-xgqt@gentoo.org> (raw)
In-Reply-To: <20231005191025.12504-1-xgqt@gentoo.org>
This enables easier usage of "nuget_link-nuget-archives"
in some special cases.
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
---
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: <nuget-path> ...
# @DESCRIPTION:
--
2.41.0
prev parent reply other threads:[~2023-10-05 19:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 19:10 [gentoo-dev] [PATCH 1/4] eclass/dotnet-pkg*: remove unnecessary auto-append of project dir Maciej Barć
2023-10-05 19:10 ` [gentoo-dev] [PATCH 2/4] eclass/dotnet-pkg-base.eclass: clarify test, quotes in dolauncher Maciej Barć
2023-10-05 19:10 ` [gentoo-dev] [PATCH 3/4] eclass/nuget.eclass: add special NUGET_API case for Gentoo devs' hosting Maciej Barć
2023-10-05 19:10 ` Maciej Barć [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231005191025.12504-4-xgqt@gentoo.org \
--to=xgqt@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox