Re: [gentoo-dev] [PATCH] java-pkg-simple.eclass: respect SLOT="0" in JAVA_LAUNCHER_FILENAME
> On Mon, 29 May 2023, Volkmar W Pogatzki wrote: >> > -: "${JAVA_LAUNCHER_FILENAME:=${PN}-${SLOT}}" >> > +if [[ ${SLOT} = 0 ]]; then >> > + JAVA_LAUNCHER_FILENAME="${PN}" >> > +else >> > + JAVA_LAUNCHER_FILENAME="${PN}-${SLOT}" >> > +fi >> >> This will no longer allow overriding the variable in the ebuild >> (at least not pre-inherit). Is this intentional? > It exactly does what it's supposed to do. > No clue about "not pre-inherit". With the above, JAVA_LAUNCHER_FILENAME="foo" in the ebuild will work if comes after the inherit line, but not if it is before it. > How to sanitize? As in your v2. :) signature.asc Description: PGP signature
Re: [gentoo-dev] [PATCH] java-pkg-simple.eclass: respect SLOT="0" in JAVA_LAUNCHER_FILENAME
> Ulrich Mueller hat am 26.05.2023 10:44 CEST geschrieben: > > > > On Fri, 26 May 2023, Volkmar W Pogatzki wrote: > > > -: "${JAVA_LAUNCHER_FILENAME:=${PN}-${SLOT}}" > > +if [[ ${SLOT} = 0 ]]; then > > + JAVA_LAUNCHER_FILENAME="${PN}" > > +else > > + JAVA_LAUNCHER_FILENAME="${PN}-${SLOT}" > > +fi > > This will no longer allow overriding the variable in the ebuild > (at least not pre-inherit). Is this intentional? > > Ulrich It exactly does what it's supposed to do. No clue about "not pre-inherit". How to sanitize? -- Volkmar W. Pogatzki
Re: [gentoo-dev] [PATCH] java-pkg-simple.eclass: respect SLOT="0" in JAVA_LAUNCHER_FILENAME
> On Fri, 26 May 2023, Volkmar W Pogatzki wrote: > -: "${JAVA_LAUNCHER_FILENAME:=${PN}-${SLOT}}" > +if [[ ${SLOT} = 0 ]]; then > + JAVA_LAUNCHER_FILENAME="${PN}" > +else > + JAVA_LAUNCHER_FILENAME="${PN}-${SLOT}" > +fi This will no longer allow overriding the variable in the ebuild (at least not pre-inherit). Is this intentional? Ulrich signature.asc Description: PGP signature
[gentoo-dev] [PATCH] java-pkg-simple.eclass: respect SLOT="0" in JAVA_LAUNCHER_FILENAME
Avoids the need for setting JAVA_LAUNCHER_FILENAME="${PN}" if SLOT is 0. Signed-off-by: Volkmar W. Pogatzki --- eclass/java-pkg-simple.eclass | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass index 929ce68c6c07..f919945280b1 100644 --- a/eclass/java-pkg-simple.eclass +++ b/eclass/java-pkg-simple.eclass @@ -161,7 +161,11 @@ fi # If ${JAVA_MAIN_CLASS} is set, we will create a launcher to # execute the jar, and ${JAVA_LAUNCHER_FILENAME} will be the # name of the script. -: "${JAVA_LAUNCHER_FILENAME:=${PN}-${SLOT}}" +if [[ ${SLOT} = 0 ]]; then + JAVA_LAUNCHER_FILENAME="${PN}" +else + JAVA_LAUNCHER_FILENAME="${PN}-${SLOT}" +fi # @ECLASS_VARIABLE: JAVA_TESTING_FRAMEWORKS # @DEFAULT_UNSET -- 2.39.3