Why is manjaro-zsh-config overwriting a file in a home directory?

Besides of the issue with mkinitcpio which was already mentioned I also noticed that with this update my /root/.zshrc got overwritten. And the old /root/.zshrc has not been saved. Probably related to this package: manjaro-zsh-config

You should be using ~/.zshrc, not that file.

When a package updates, all files are overwritten unless there is one or more that are specified to be backed up which generates a pacnew. Those are normally config files in /etc/.

Wait a second. /root is the home directory of user root. No matter if it is the super user. It is still a home directory. And ~/.zshrc is owned by this user.

The first question is, why a package is overwriting a file in a home directory? This should not be the case from my point of view. I am sure many other Linux admins have a customized .zshrc. Why should that be overwriten by a package?

And secondly, if the outcome of question #1 is that we want to overwritte that file, then the former ~/.zshrc should be saved as ~/.zshrc.pacsave.

From my point of view, regardless how you put it, the current behavior is a bug.

2 Likes

You’ll have to ask @Chrysostomus about that.

Yes it overrides the root users config. Very Bad indeed!

2 Likes

Hmm… That is a good point. The reason for the current behavior is threefold;

  • root user has significantly different configuration than regular users, and I didn’t want to increase shell startup time by checking user every time a new shell is spawned
  • it didn’t occur to me that someone would actually customize the root users zshrc on a desktop distro.
  • I thought that pacnew would be generated automatically, but that doesn’t seem to be the case.

So, this needs fixing.

2 Likes

This happens only for files mentioned in the backup= array. Which also creates the .pacsave files.

3 Likes

So, the next update should be better

https://wiki.archlinux.org/index.php/Pacman#Skip_file_from_being_upgraded

1 Like

That’s referring to /etc/pacman.conf, it will do nothing in a PKGBUILD. :wink:

1 Like

:sweat_smile: It is good that I post things here

3 Likes

For me this is a good example of what is good about Linux, Manjaro and collaborative approaches.

  • Issue raised

  • It is then interrogated

  • Tested and corroborated

  • Open acknowledgement and explication of issue

  • Issue addressed

The satisfaction of a process well done.

Most excellent.

3 Likes