Summary: | Users prone to misconfiguring /root/.bashrc because no skeleton file is present | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | RumpletonBongworth <kfm> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | kfm |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://forums.gentoo.org/viewtopic-t-1169020.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
RumpletonBongworth
2024-06-18 17:23:27 UTC
s/principle/principal/ The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68c208ecd6b805ebc7796d2b71ceef4614179a2d commit 68c208ecd6b805ebc7796d2b71ceef4614179a2d Author: Kerin Millar <kfm@plushkava.net> AuthorDate: 2024-06-19 08:00:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-20 17:53:44 +0000 app-shells/bash: uncouple 10-gentoo-color.bash; warn of bad .bashrc Some users choose to manage /etc/bash/bashrc directly and disregard any of its updates outright. Additionally, some users have ~/.bashrc as a copy of ${FILESDIR}/bashrc which is either exact or which contains only trivial modifications, meaning that the bashrc.d drop-ins end up being sourced twice. For both of these scenarios, users will presently encounter a diagnostic message indicating that the genfun_has_readline function does not exist. In turn, that is because the function is declared by /etc/bash/bashrc, while also being used by /etc/bash/bashrc.d/10-gentoo-color.bash. Since there is no particular need for 10-gentoo-color.bash to be coupled in this manner, jettison the function. Instead, have bashrc consider the exit status of the "shopt -s no_empty_cmd_completion" command and have 10-gentoo-color.bash perform its own test. Additionally, implement a new bashrc.d drop-in named "15-gentoo-bashrc-check.bash". Its purpose is to check whether ~/.bashrc exists as a copy of ${FILESDIR}/bashrc and instruct the user as to how to remedy the situation. After performing the check, it touches a file under ${TMPDIR} so that it can subsequently avoid driving the user mad. I recommend that this drop-in be removed one year hence. I disliked having to do this but consider it to be in the public interest. Signed-off-by: Kerin Millar <kfm@plushkava.net> Bug: https://bugs.gentoo.org/934523 Signed-off-by: Sam James <sam@gentoo.org> ...-5.1_p16-r11.ebuild => bash-5.1_p16-r12.ebuild} | 3 +++ ...sh-5.2_p26-r4.ebuild => bash-5.2_p26-r5.ebuild} | 3 +++ ....3_alpha-r3.ebuild => bash-5.3_alpha-r4.ebuild} | 3 +++ app-shells/bash/files/bashrc-r1 | 17 +++++++-------- .../bash/files/bashrc.d/10-gentoo-color.bash | 3 ++- .../files/bashrc.d/15-gentoo-bashrc-check.bash | 24 ++++++++++++++++++++++ 6 files changed, 42 insertions(+), 11 deletions(-) |