You are not logged in.

#1 Today 06:00:13

Enrico1989
Member
Registered: 2018-07-05
Posts: 406

How do I have my ranger config files updated?

I've just realized that my $HOME/.config/ranger/rifle.conf (most likely together with other files in the same dir) is outdate with respect to what I see on https://github.com/ranger/ranger or even in my $HOME/AURbuilds/ranger-git/src/ranger-git/ (I use ranger from the AUR).

Clearly I could manually copy-paste the updated config files from that latter directory to the former, but then I'd have to remember to do it periodically (beside having to remember to update AUR-installed packages, ahah).

I also see that I could make $HOME/.config/ranger/rifle.conf actually a symbolic link to the corresponding file under $HOME/AURbuilds/ranger-git/src/ranger-git/.

What is the recommended way to keep my local config files for ranger in sync with the package updates?

I have used in the past ranger from the official repo instead of the AUR, but I honestly don't remember if the files under $HOME/.config/ranger/ where overwritten or what, when I'd update ranger via pacman.

(Clearly, the question could apply to packages other than ranger, ...)

Offline

#2 Today 06:38:26

loqs
Member
Registered: 2014-03-06
Posts: 19,018

Re: How do I have my ranger config files updated?

Enrico1989 wrote:

I have used in the past ranger from the official repo instead of the AUR, but I honestly don't remember if the files under $HOME/.config/ranger/ where overwritten or what, when I'd update ranger via pacman.

No package should ever install files to $HOME. See Arch package guidelines Directories.

Offline

#3 Today 07:11:56

Enrico1989
Member
Registered: 2018-07-05
Posts: 406

Re: How do I have my ranger config files updated?

loqs wrote:
Enrico1989 wrote:

I have used in the past ranger from the official repo instead of the AUR, but I honestly don't remember if the files under $HOME/.config/ranger/ where overwritten or what, when I'd update ranger via pacman.

No package should ever install files to $HOME. See Arch package guidelines Directories.

Thanks for the info!

There seem to be no config around in my system:

$ sudo find / -name 'ranger' ! -regex '^/home/.*' -type d

find: ‘/run/user/1000/doc’: Permission denied
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/share/licenses/ranger
/usr/share/doc/ranger
/usr/lib/python3.14/site-packages/ranger
/root/.config/ranger
/root/.local/share/ranger

After all, the very ranger project suggests copying the config from their dir to ~/.config/ranger; I suppose that's what I did, and therefore the burden is on my to keep those update.

I guess the symbolic link is the best approach to stop worrying about updating those config files, as long as I don't customize them.

Offline

#4 Today 07:17:04

Enrico1989
Member
Registered: 2018-07-05
Posts: 406

Re: How do I have my ranger config files updated?

Enrico1989 wrote:
/root/.config/ranger
/root/.local/share/ranger

Well, actually those 2 are ranger-related. But they're mostly empty. I wonder if they got created some time I might have run ranger as root…

I guess I can delete them, no?

Offline

#5 Today 10:15:30

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,356

Re: How do I have my ranger config files updated?

Yes, they'll be recreated when necessary.

Enrico1989 wrote:

I also see that I could make $HOME/.config/ranger/rifle.conf actually a symbolic link to the corresponding file under $HOME/AURbuilds/ranger-git/src/ranger-git/.

Don't do that as those files can change without warning when you build (not install) a new version .
link to wherever the ranger package puts those files at installation time.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 Today 10:27:45

Enrico1989
Member
Registered: 2018-07-05
Posts: 406

Re: How do I have my ranger config files updated?

Lone_Wolf wrote:

Don't do that as those files can change without warning when you build (not install) a new version.

Ok…

Lone_Wolf wrote:

link to wherever the ranger package puts those files at installation time.

If "ranger package puts those files" at location, it still means it will overwrite my copies, if put them there, no?

As in, where's the difference between the two approaches?

Last edited by Enrico1989 (Today 10:28:42)

Offline

Board footer

Powered by FluxBB