Mailing List Archive

[PATCH 1/7] eclass/dotnet-pkg-base.eclass: quotes and style tweaks for edge cases
Signed-off-by: Maciej Bar? <xgqt@gentoo.org>
---
eclass/dotnet-pkg-base.eclass | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
index 1a9d31120..e7484a6c5 100644
--- a/eclass/dotnet-pkg-base.eclass
+++ b/eclass/dotnet-pkg-base.eclass
@@ -63,18 +63,24 @@ DOTNET_PKG_BDEPS=""

# Have this guard to be sure that *DEPS are not added to
# the "dev-dotnet/dotnet-runtime-nugets" package dependencies.
-if [[ ${CATEGORY}/${PN} != dev-dotnet/dotnet-runtime-nugets ]] ; then
+if [[ "${CATEGORY}/${PN}" != dev-dotnet/dotnet-runtime-nugets ]] ; then
if [[ -z ${DOTNET_PKG_COMPAT} ]] ; then
die "${ECLASS}: DOTNET_PKG_COMPAT not set"
fi

- DOTNET_PKG_RDEPS+=" virtual/dotnet-sdk:${DOTNET_PKG_COMPAT} "
- DOTNET_PKG_BDEPS+=" ${DOTNET_PKG_RDEPS} "
+ DOTNET_PKG_RDEPS+="
+ virtual/dotnet-sdk:${DOTNET_PKG_COMPAT}
+ "
+ DOTNET_PKG_BDEPS+="
+ ${DOTNET_PKG_RDEPS}
+ "

# Special package "dev-dotnet/csharp-gentoodotnetinfo" used for information
# gathering, example for usage see the "dotnet-pkg-base_info" function.
- if [[ ${CATEGORY}/${PN} != dev-dotnet/csharp-gentoodotnetinfo ]] ; then
- DOTNET_PKG_BDEPS+=" dev-dotnet/csharp-gentoodotnetinfo "
+ if [[ "${CATEGORY}/${PN}" != dev-dotnet/csharp-gentoodotnetinfo ]] ; then
+ DOTNET_PKG_BDEPS+="
+ dev-dotnet/csharp-gentoodotnetinfo
+ "
fi

IUSE+=" debug "
--
2.43.0
Re: [PATCH 1/7] eclass/dotnet-pkg-base.eclass: quotes and style tweaks for edge cases [ In reply to ]
>>>>> On Sat, 03 Feb 2024, Maciej Bar? wrote:

> -if [[ ${CATEGORY}/${PN} != dev-dotnet/dotnet-runtime-nugets ]] ; then
> +if [[ "${CATEGORY}/${PN}" != dev-dotnet/dotnet-runtime-nugets ]] ; then

These quotes are not necessary.

> - if [[ ${CATEGORY}/${PN} != dev-dotnet/csharp-gentoodotnetinfo ]] ; then
> - DOTNET_PKG_BDEPS+=" dev-dotnet/csharp-gentoodotnetinfo "
> + if [[ "${CATEGORY}/${PN}" != dev-dotnet/csharp-gentoodotnetinfo ]] ; then

Same.

> + DOTNET_PKG_BDEPS+="
> + dev-dotnet/csharp-gentoodotnetinfo
> + "
Re: [PATCH 1/7] eclass/dotnet-pkg-base.eclass: quotes and style tweaks for edge cases [ In reply to ]
Maciej Bar? <xgqt@gentoo.org> writes:

> Signed-off-by: Maciej Bar? <xgqt@gentoo.org>
> ---

The series lgtm but please add some commit messages to them explaining
the motivation / why we're doing it now if applicable. No need to
re-send to ML once that's done.

Thanks!

> eclass/dotnet-pkg-base.eclass | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
> index 1a9d31120..e7484a6c5 100644
> --- a/eclass/dotnet-pkg-base.eclass
> +++ b/eclass/dotnet-pkg-base.eclass
> @@ -63,18 +63,24 @@ DOTNET_PKG_BDEPS=""
>
> # Have this guard to be sure that *DEPS are not added to
> # the "dev-dotnet/dotnet-runtime-nugets" package dependencies.
> -if [[ ${CATEGORY}/${PN} != dev-dotnet/dotnet-runtime-nugets ]] ; then
> +if [[ "${CATEGORY}/${PN}" != dev-dotnet/dotnet-runtime-nugets ]] ; then
> if [[ -z ${DOTNET_PKG_COMPAT} ]] ; then
> die "${ECLASS}: DOTNET_PKG_COMPAT not set"
> fi
>
> - DOTNET_PKG_RDEPS+=" virtual/dotnet-sdk:${DOTNET_PKG_COMPAT} "
> - DOTNET_PKG_BDEPS+=" ${DOTNET_PKG_RDEPS} "
> + DOTNET_PKG_RDEPS+="
> + virtual/dotnet-sdk:${DOTNET_PKG_COMPAT}
> + "
> + DOTNET_PKG_BDEPS+="
> + ${DOTNET_PKG_RDEPS}
> + "
>
> # Special package "dev-dotnet/csharp-gentoodotnetinfo" used for information
> # gathering, example for usage see the "dotnet-pkg-base_info" function.
> - if [[ ${CATEGORY}/${PN} != dev-dotnet/csharp-gentoodotnetinfo ]] ; then
> - DOTNET_PKG_BDEPS+=" dev-dotnet/csharp-gentoodotnetinfo "
> + if [[ "${CATEGORY}/${PN}" != dev-dotnet/csharp-gentoodotnetinfo ]] ; then
> + DOTNET_PKG_BDEPS+="
> + dev-dotnet/csharp-gentoodotnetinfo
> + "
> fi
>
> IUSE+=" debug "
Re: [PATCH 1/7] eclass/dotnet-pkg-base.eclass: quotes and style tweaks for edge cases [ In reply to ]
Thanks Sam, this is what I added:

Subject: [PATCH 1/7] eclass/dotnet-pkg-base.eclass: quotes and style tweaks

format special variables in edge cases section of the dotnet-pkg-base eclass

Signed-off-by: Maciej Bar? <xgqt@gentoo.org>


Subject: [PATCH 2/7] eclass/dotnet-pkg-base.eclass: deprecate wrong-style
names

some functions were written in wrong style by ommission,
deprecate the wrong names (leave them in the elcass for compability)
and add functions with proper names

Signed-off-by: Maciej Bar? <xgqt@gentoo.org>


Subject: [PATCH 3/7] eclass/dotnet-pkg-base.eclass: dotnet-pkg-base_test -
remove directory magic

remove broken directory magic from the "dotnet-pkg-base_test" function,
now the eclass consumers can pass the directory as the last argument and
let the dotnet executable handle arguments instead of putting the weight
on the eclass,
also update the "dotnet-pkg-base_restore_tools" function documentation

Signed-off-by: Maciej Bar? <xgqt@gentoo.org>


Subject: [PATCH 4/7] eclass/dotnet-pkg*: add dotnet-pkg_remove-bad

add new eclass feature that allows to remove projects from .NET
solution files,
the functions modified:
dotnet-pkg-base_sln-remove, dotnet-pkg_remove-bad, dotnet-pkg_src_prepare

Signed-off-by: Maciej Bar? <xgqt@gentoo.org>


Subject: [PATCH 5/7] eclass/dotnet-pkg.eclass: add dotnet-pkg_force-compat

add new eclass function "dotnet-pkg_force-compat" that appends special
variables to dotnet command executions to force compability with
a spefified .NET SDK version

Signed-off-by: Maciej Bar? <xgqt@gentoo.org>


Subject: [PATCH 6/7] eclass/dotnet-pkg-base.eclass: set DOTNET_ROOT

export proper DOTNET_ROOT for wanted DOTNET_PKG_COMPAT

Signed-off-by: Maciej Bar? <xgqt@gentoo.org>


Subject: [PATCH 7/7] eclass/dotnet-pkg.eclass: prepare for safely using
Nuget

prevent NuGet executable (part of "dotnet-sdk") from fetching remote NuGet
package sources,
add two new features to the nuget ecalss:
find and remove all nuget.config files,
add and use "nuget_writeconfig" function that creates a "nuget.config"
file which forces the use of NuGet packages specified in the ebuild file

Signed-off-by: Maciej Bar? <xgqt@gentoo.org>



W dniu 8.02.2024 o 08:02, Sam James pisze:
>
> Maciej Bar? <xgqt@gentoo.org> writes:
>
>> Signed-off-by: Maciej Bar? <xgqt@gentoo.org>
>> ---
>
> The series lgtm but please add some commit messages to them explaining
> the motivation / why we're doing it now if applicable. No need to
> re-send to ML once that's done.
>
> Thanks!
>
>> eclass/dotnet-pkg-base.eclass | 16 +++++++++++-----
>> 1 file changed, 11 insertions(+), 5 deletions(-)
>>
>> diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
>> index 1a9d31120..e7484a6c5 100644
>> --- a/eclass/dotnet-pkg-base.eclass
>> +++ b/eclass/dotnet-pkg-base.eclass
>> @@ -63,18 +63,24 @@ DOTNET_PKG_BDEPS=""
>>
>> # Have this guard to be sure that *DEPS are not added to
>> # the "dev-dotnet/dotnet-runtime-nugets" package dependencies.
>> -if [[ ${CATEGORY}/${PN} != dev-dotnet/dotnet-runtime-nugets ]] ; then
>> +if [[ "${CATEGORY}/${PN}" != dev-dotnet/dotnet-runtime-nugets ]] ; then
>> if [[ -z ${DOTNET_PKG_COMPAT} ]] ; then
>> die "${ECLASS}: DOTNET_PKG_COMPAT not set"
>> fi
>>
>> - DOTNET_PKG_RDEPS+=" virtual/dotnet-sdk:${DOTNET_PKG_COMPAT} "
>> - DOTNET_PKG_BDEPS+=" ${DOTNET_PKG_RDEPS} "
>> + DOTNET_PKG_RDEPS+="
>> + virtual/dotnet-sdk:${DOTNET_PKG_COMPAT}
>> + "
>> + DOTNET_PKG_BDEPS+="
>> + ${DOTNET_PKG_RDEPS}
>> + "
>>
>> # Special package "dev-dotnet/csharp-gentoodotnetinfo" used for information
>> # gathering, example for usage see the "dotnet-pkg-base_info" function.
>> - if [[ ${CATEGORY}/${PN} != dev-dotnet/csharp-gentoodotnetinfo ]] ; then
>> - DOTNET_PKG_BDEPS+=" dev-dotnet/csharp-gentoodotnetinfo "
>> + if [[ "${CATEGORY}/${PN}" != dev-dotnet/csharp-gentoodotnetinfo ]] ; then
>> + DOTNET_PKG_BDEPS+="
>> + dev-dotnet/csharp-gentoodotnetinfo
>> + "
>> fi
>>
>> IUSE+=" debug "
>

--
Have a great day!

~ Maciej XGQT Bar?

xgqt@gentoo.org
Gentoo Linux developer
(dotnet, emacs, math, ml, nim, scheme, sci)
https://wiki.gentoo.org/wiki/User:Xgqt
9B0A 4C5D 02A3 B43C 9D6F D6B1 14D7 4A1F 43A6 AC3C