Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#74572 - [java-runtime-common] PATH variable duplicate entries

Attached to Project: Arch Linux
Opened by Yuri Cherio (cherio) - Wednesday, 27 April 2022, 15:09 GMT
Last edited by David Thurstenson (thurstylark) - Wednesday, 27 April 2022, 21:46 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Levente Polyak (anthraxx)
freswa (frederik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

Description:
Path "/usr/lib/jvm/default/bin" gets added to the PATH variable multiple times in "/etc/profile.d/jre.sh". The 1st time this happens for "root" user. The second time when "bashrc" is run for a non-root user.

Additional info:
* package name: java-runtime-common
* package version(s): any recent version
* config and/or log files: "/etc/profile.d/jre.sh" (and possibly "/etc/profile.d/jre.csh" although I do not use "csh")

Proposed changes:
The rest of scripts in "/etc/profile.d" appear to have switched to using "append_path" function sourced in "/etc/profile" (e.g. /etc/profile.d/perlbin.sh provided by the standard "perl" package). Following the trend seems to be the logical solution.

After I made the following changes in my local "/etc/profile.d/jre.sh" duplicate entries were no longer present

-export PATH=${PATH}:/usr/lib/jvm/default/bin
+append_path '/usr/lib/jvm/default/bin'
+export PATH
This task depends upon

Comment by Yuri Cherio (cherio) - Wednesday, 27 April 2022, 16:42 GMT
It looks like my submission is a duplicate of https://bugs.archlinux.org/task/66339 with the exception that mine is specific to bash. The solution in the last comment on that issue is identical to what I came up with

Loading...