You are not logged in.

#1 2012-03-12 21:59:48

Evgeniuz
Member
Registered: 2012-01-15
Posts: 7

Reset config files for a package

According to https://wiki.archlinux.org/index.php/Pa … save_Files I have this situation in my config files:
original = X, current = Y, new = X
Is there a way to set current config files of package to X and save Y as .pacsave OR install X as .pacnew and leave Y in place without removing package?

Last edited by Evgeniuz (2012-03-12 22:00:00)

Offline

#2 2012-03-12 22:17:20

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: Reset config files for a package

if you changed a config file, and pacman is stepping over it instead of creating a pacnew file. then file a bug report. But only if its a config file (resides in /etc)

Offline

#3 2012-03-12 22:33:00

boswbr25
Member
Registered: 2012-02-29
Posts: 63

Re: Reset config files for a package

I'm not positive I'm understanding you right, but if I am and you are talking about basically backing up a package's config file, it is pretty simple.  I believe the .pacnew and .pacsave refers to changes in the makeup of a package in general, not its config file. 

To change back to the original config and save the modified version you can just add .backup or anything onto the end of the file that you don't want to use right now .  Then, you just need to save the file that you want to use as the config file with wthe filename of the configuration file for that package (so the same but w/o the .backup).

Sorry if I am misunderstanding you and you really did mean .pacnew or .pacsave and not config files.  Or if I am totally wrong but that is my understanding of config files and I know it has worked for me in multiple instances.

~Boz~

Offline

#4 2012-03-13 10:06:42

Evgeniuz
Member
Registered: 2012-01-15
Posts: 7

Re: Reset config files for a package

eldragon wrote:

if you changed a config file, and pacman is stepping over it instead of creating a pacnew file. then file a bug report. But only if its a config file (resides in /etc)

Pacman will create .pacnew files only when original = X, current = Y, new = Z, but I have original = X, current = Y, new = X, and in this case it just silently leaves Y in place. It's meant to do it, it's not a bug, but I need it to create X.pacnew in this situation. Is there a way for this?

Offline

#5 2012-03-13 10:26:15

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: Reset config files for a package

Why do you want to do this? You can retrieve the "original" config file by opening the package.

Offline

#6 2012-03-13 10:36:54

Evgeniuz
Member
Registered: 2012-01-15
Posts: 7

Re: Reset config files for a package

I often mess up config files, and easy way to restore config would be restoring original configs as .pacnew and then diffing them with messed up config. And executing something like "pacman --reset-config -S package" would be easier than finding package, opening it, extracting files, etc.

Last edited by Evgeniuz (2012-03-13 12:03:15)

Offline

#7 2012-03-13 10:57:45

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: Reset config files for a package

Not a very elegant solution, but you could move the config file first then reinstall.

Offline

#8 2012-03-13 11:26:26

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Reset config files for a package

Or make a backup copy of the original before you start making changes (especially if you know you're likely to mess something up). Some packages actually supply a .conf.example or .conf.orig and instruct you to copy this to .conf and make your changes there.

Offline

Board footer

Powered by FluxBB