With the gentoo-repos in default location you can find the files inChecko55 wrote:Hi,
no matter where I put the bashrc, it has no effect or any changes visible.
Can I get the recommended configs from etc-update again? Maybe I can do a merge then...
Code: Select all
/var/db/repos/gentoo/app-shells/bash/files
That thread concerns a dissimilar problem. The one described by this thread will occur where users do not merge the updated /etc/bash/bashrc file, be it with dispatch-conf or by otherwise manually reviewing and accounting for the changes therein.Banana wrote:Please have also a look here: viewtopic-t-1169476-highlight-.html
Similar problems and maybe a solution for you.
Code: Select all
# emerge --oneshot --noconfmem bash
# dispatch-conf

You should not do this. The $HOME/.bashrc file isn't intended to contain vendor-supplied code other than in one potential respect: when a new user account is created, the contents of the HOME directory may be populated according to the contents of /etc/skel. As such, the default ".bashrc" just performs a check for interactive shells and leaves it to the user to decide whatever else they want to do with it. It's unrelated to the problem.sunox wrote:I replaced .bashrc with the "bashrc" file in /var/db/repos/[...] but it made no difference. Emerging bash one-shot doesn't seem to replace any config files, nor does it create them after I remove the existing ones.

Firstly, your feedback is welcomed. As the person that submitted that the changes, I am keeping a close eye on any posts concerning this.Hammett wrote:I believe a news would have been nice in this scenario to alert users that this config update is "mandatory" and how to proceed to restore the customisation done.
It kind of is if you ignore the updated config files and suddenly the functionality that you expect is no longer there. You will understand I am no fit for maitaining bashrc at all past the basic aliases and PS1 promptRumpletonBongworth wrote: Strictly speaking, it not a mandatory update. If you wish to customise /etc/bash/bashrc directly, effectively nominating yourself as its maintainer, and ignore all future updates, you may continue to do that. In that case, you are not obliged to source the drop-ins either.
Agreed, there will be users that do not read the news, but then it's their responsibility what they do with their system, and I am all in for a good old RTFM. I trust that when you guys issue news, they are important and should be read. It is not that you send every day, so when they come, they are importantRumpletonBongworth wrote: Regarding the provision of the news item, perhaps you are right. It wouldn't have been difficult to whip something up and, with the benefit of hindsight, it should have at least been considered. Although, I can say from experience that we would still be seeing threads regarding botched /etc updates which, lest we forget, is what this particular thread concerns. There will always be a subset of users that just don't read news or end up responding to it in a way that begets more questions than answers. And there will always be users that fumble config updates. Additionally, the einfo messages should have been warnings originally, though they are now.

If that was the only reason for editing the system-wide bashrc then you might be better off creating a drop-in such as /etc/bash/bashrc.d/99-local.bash to contain your preferences. I would have issued much the same advice prior to the app-shells/bash update.Hammett wrote:You will understand I am no fit for maitaining bashrc at all past the basic aliases and PS1 prompt
Indeed, this is what I have done now. Also, this system is almost 18 years old (never re-installed Gentoo on this machine).... my knowledge 18 years ago was not the same... and I liked risk a tad moreRumpletonBongworth wrote:If that was the only reason for editing the system-wide bashrc then you might be better off creating a drop-in such as /etc/bash/bashrc.d/99-local.bash to contain your preferences. I would have issued much the same advice prior to the app-shells/bash update.Hammett wrote:You will understand I am no fit for maitaining bashrc at all past the basic aliases and PS1 prompt
I just deleted my .bashrc file and put my customizations in bashrc.d (or whatever it is called) and everything seems fine now. I could have swore that my .bashrc had a bunch of stuff in it by default, but maybe I'm wrong?RumpletonBongworth wrote:You should not do this. The $HOME/.bashrc file isn't intended to contain vendor-supplied code other than in one potential respect: when a new user account is created, the contents of the HOME directory may be populated according to the contents of /etc/skel. As such, the default ".bashrc" just performs a check for interactive shells and leaves it to the user to decide whatever else they want to do with it. It's unrelated to the problem.sunox wrote:I replaced .bashrc with the "bashrc" file in /var/db/repos/[...] but it made no difference. Emerging bash one-shot doesn't seem to replace any config files, nor does it create them after I remove the existing ones.
EDIT: As noted by the previous post, using the --noconfmem option would have re-queued the new systemd-wide bashrc file for your review, though this isn't usually necessary other than under irregular circumstances.

Yes, you are are. See my previous post concerning /etc/skel and, in particular, /etc/skel/.bashrc. That is the file that would have been copied to your home directory at the time that your created your user account. None of this has anything to do with the problem that Checko55 opened this thread for, though.sunox wrote:I just deleted my .bashrc file and put my customizations in bashrc.d (or whatever it is called) and everything seems fine now. I could have swore that my .bashrc had a bunch of stuff in it by default, but maybe I'm wrong?
I am having trouble with root only as I have customizations in /root/.bashrc. Do your instructions meanIonen wrote:...if you were modifying the bashrc itself I'd suggest moving your custom configs to bashrc.d as well and just keep the original...
Code: Select all
# cp /root/.bashrc /etc/bash/bashrc.d/bashrc
They aren't instructions; it was merely a recommendation to Hammett pertaining to his particular justification for deliberately ignoring the /etc/bash/bashrc update in dispatch-conf, thus self-inflicting the problem that Checko55 described in the first post. If you are experiencing that same problem then you, too, have ignored the config update and you need to merge it. Again, this thread really has nothing to do with ".bashrc" (as in dot bashrc) at all. To help you specifically, I would need to know what the trouble is exactly. Does it concern genfun_has_readline errors or something else?cfgauss wrote:I am having trouble with root only as I have customizations in /root/.bashrc. Do your instructions meanIonen wrote:...if you were modifying the bashrc itself I'd suggest moving your custom configs to bashrc.d as well and just keep the original...only?Code: Select all
# cp /root/.bashrc /etc/bash/bashrc.d/bashrc

Reading this a second time - and with the benefit of having slept on it - I could interpret your trouble as simply being one of how to make your root-only customisations be applied to all users rather than just the root user alone. Is that what you meant? If it is then yes, you may create your own file under /etc/bash/bashrc.d/ or even move an existing ~/.bashrc there. However, there are several things to be aware of:-cfgauss wrote: am having trouble with root only
Code: Select all
# mv ~/.bashrc /etc/bash/bashrc.d/bashrc.bash
My ~/.bashrc provides the expected customization. However, for rootRumpletonBongworth wrote:Does it concern genfun_has_readline errors or something else?
Code: Select all
# . ~/.bashrc
bash: genfun_has_readline: command not found
OK. In that case, I would refer you to my first post in this thread. You should begin by running the dispatch-conf command and checking whether it presents a new /etc/bash/bashrc file to be merged/installed (it should).cfgauss wrote:My ~/.bashrc provides the expected customization. However, for rootRumpletonBongworth wrote:Does it concern genfun_has_readline errors or something else?Any hints on fixing this will be gratefully received.Code: Select all
# . ~/.bashrc bash: genfun_has_readline: command not found
