Arch Linux

Please read this before reporting a bug:

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!

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 Toolybird (Toolybird) - Thursday, 14 September 2023, 06:58 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
freswa (frederik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Path "/usr/lib/jvm/default/bin" gets added to the PATH variable multiple times in "/etc/profile.d/". 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/" (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/ 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/" 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

Closed by  Toolybird (Toolybird)
Thursday, 14 September 2023, 06:58 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#66339 

and "Fixed" java-runtime-common 3-5
Comment by Yuri Cherio (cherio) - Wednesday, 27 April 2022, 16:42 GMT
It looks like my submission is a duplicate of 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