Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922221 - dev-java/batik causes depending java apps to lose their java-args
Summary: dev-java/batik causes depending java apps to lose their java-args
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Java team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-01-16 11:06 UTC by Manuel Mommertz
Modified: 2024-01-19 05:52 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Mommertz 2024-01-16 11:06:40 UTC
Last lines of /usr/share/batik-1.16/package.env:

gjl_java_args="-Djava.security.policy=file:/usr/share/batik-1.16/etc/batik.policy"
ENV_VARS="gjl_java_args"


This causes all launchers for apps that depend on batik to get there `gil_java_args` overwritten. This can be fixed by including the original gil_java_args, so the package.env of batik would contain:

gjl_java_args="$gjl_java_args -Djava.security.policy=file:/usr/share/batik-1.16/etc/batik.policy"

(I hope this is understandable. I find it hart to explain. Please ask, if something is unclear.)

Reproducible: Always
Comment 1 Volkmar W. Pogatzki 2024-01-16 12:06:01 UTC
(In reply to Manuel Mommertz from comment #0)
> [...]
> 
> (I hope this is understandable. I find it hart to explain. Please ask, if
> something is unclear.)

Thanks for reporting. It would be much more convenient for the devs if you could provide a pull request according to https://wiki.gentoo.org/wiki/GitHub_Pull_Requests. Pull requests are presently the preferred way of submitting changes.  That way, also interested users could pram[1] your proposal and help testing.

[1] https://github.com/projg2/pram https://packages.gentoo.org/packages/app-portage/pram
Comment 2 Volkmar W. Pogatzki 2024-01-16 12:34:56 UTC
P.S. for discussing your topics you might also join ircs://irc.libera.chat/#gentoo-java (https://web.libera.chat/#gentoo-java)
Comment 3 Manuel Mommertz 2024-01-16 13:18:05 UTC
Thanks for the hints. Tomorrow I will try to create a pull request. :)
Comment 4 Manuel Mommertz 2024-01-19 05:50:58 UTC
You can easily test the behavior. Just put this lines in a file and execute it:

#!/bin/bash
gjl_package=batik-1.16
gjl_main=--version
gjl_java_args=-h
GJL_DEBUG=1
source /usr/share/java-config-2/launcher/launcher.bash

You will notice that the -h argument does not make it to the final call to exec java and therefore java will list its version because of the value in gil_main. But replace batik-1.6 by another package, not depending on batik, like xalan, the -h makes it through and you get the usage information of java.
Comment 5 Larry the Git Cow gentoo-dev 2024-01-19 05:52:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de95d4d877419d13a16de8467f3c5f0c10149b4d

commit de95d4d877419d13a16de8467f3c5f0c10149b4d
Author:     Manuel Mommertz <manuel.mommertz@desy.de>
AuthorDate: 2024-01-17 10:53:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-19 05:52:03 +0000

    dev-java/batik: Append to variable gjl_java_args instead of replacing it
    
    Before this fix all launchers for apps that depend on batik get their gil_java_args variable overwritten. Now the relevant config for batik is appended, keeping the previous content of the variable.
    
    Closes: https://bugs.gentoo.org/922221
    Signed-off-by: Manuel Mommertz <manuel.mommertz@desy.de>
    Closes: https://github.com/gentoo/gentoo/pull/34864
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-java/batik/{batik-1.17.ebuild => batik-1.17-r1.ebuild} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)