Bug 2117365 - Default ~/.bashrc sources editor backups from ~/.bashrc.d after the changed file
Summary: Default ~/.bashrc sources editor backups from ~/.bashrc.d after the changed file
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 39
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Siteshwar Vashisht
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-10 19:01 UTC by adingman@mitre.org
Modified: 2023-08-16 08:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simple change to exclude file names ending in ~ (333 bytes, patch)
2022-08-10 19:01 UTC, adingman@mitre.org
kdudka: review+
Details | Diff

Description adingman@mitre.org 2022-08-10 19:01:46 UTC
Created attachment 1904802 [details]
Simple change to exclude file names ending in ~

Description of problem:
Default .bashrc installed in /etc/skel will source editor backup files from ~/.bashrc.d . These sort lexically after the original file, which can cause changed settings to be effectively ignored.

Version-Release number of selected component (if applicable):
5.1.16-2.fc36

How reproducible:
Always

Steps to Reproduce:
1. cat > ~/.bashrc.d/oops <<EOF
export FOO=old
EOF
2. sed -i~ -e 's/=old/=new/' ~/.bashrc.d/oops
3. . /etc/skel/.bashrc
4. echo $FOO

Actual results:
old


Expected results:
new

Additional info:
Although the reproducer above uses sed, the '~' suffix is applied to backup files by default in Emacs and in Vim with the 'backup' option turned on. Seems common enough to be worth avoiding. Four-character simple fix attached as a git diff.

Comment 1 Ben Cotton 2023-04-25 17:45:03 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 2 Fedora Release Engineering 2023-08-16 08:14:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


Note You need to log in before you can comment on or make changes to this bug.