Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524456 - sys-apps/baselayout-java - /etc/profile.d/ user_id is not set
Summary: sys-apps/baselayout-java - /etc/profile.d/ user_id is not set
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
Depends on:
Reported: 2014-10-04 13:32 UTC by Fabian Henze
Modified: 2015-07-24 09:00 UTC (History)
1 user (show)

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

Fix this and other set -u issues (baselayout-java-setu.patch,833 bytes, patch)
2015-07-24 09:00 UTC, Martin Väth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Henze 2014-10-04 13:32:08 UTC
/etc/profile.d/ fails to handle the case when $UID is already set.
Adding an else branch to the first if clause with
fixes the problem.

Reproducible: Always
Comment 1 Martin Väth 2015-07-24 09:00:35 UTC
Created attachment 407502 [details, diff]
Fix this and other set -u issues

This problem is not only cosmetical if the profile is sourced with set -u: Then it gives an error and stops further sourcing.

The attached patch fixes this and some other issues with set -u

(Note that working with set -u makes sense, since it is the only available form of a "strict" syntax checking in shell code.)

The attached patch also fixes some (more theoretical) quoting problems and does not append ":" to MANPATH is MANPATH was previously empty or unset.