You are not logged in.

#1 2008-03-27 06:55:49

cyberpatrol
Member
From: Germany
Registered: 2006-11-22
Posts: 68

Config file protection for whole directories?

Hi!

I know the NoUpgrade option in /etc/pacman.conf to protect config files, which are not listed in the backup directive in the PKGBUILD.
But is it possible to protect a complete directory with this option?

The reason, why I'm asking, is, that I'd like to reorganize my KMenu globally for every user. KMenuedit has to many problems and can corrupt the whole KMenu. So I'd like to do this by editing the .desktop files.

But there are too many of these files, which I want to edit, so that it was a bit too long winded, adding every single .desktop file to pacman.conf.

I'd like to add the directories /opt/kde/share/applications, /usr/share/applications and their subdirectories to pacman.conf, so that the whole directories and every file in them are protected.

Is this possible somehow?

Offline

#2 2008-03-27 16:42:59

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 792

Re: Config file protection for whole directories?

After looking over man pacman.conf, it looks like it's only possible to protect individual files.  But there is this:

Include = path
           Include another config file. This file can include repositories or
           general configuration options.

You could specify the individual files in the additional config file and not clutter up your pacman.conf.

The other alternative is to use a source code management system.  Mercurial will monitor a directory for changes and allow you to roll back to the original versions.  CVS, subversion, darcs or git may do similar; I don't know.  I use mercurial in /etc.  I just have to remember to commit changes.  Works great so far.

Offline

#3 2008-03-28 23:44:17

cyberpatrol
Member
From: Germany
Registered: 2006-11-22
Posts: 68

Re: Config file protection for whole directories?

Source code management systems are far too complicated for this. The alternative with an additional config file could be quite interesting, but I added every single file I changed to pacman.conf. These are a couple of NoUpgrade entries, but not that much, as I thought before.
Thank you, anyway.

Offline

Board footer

Powered by FluxBB