You are not logged in.

#1 2011-08-01 04:40:43

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Merge Current and Pacnew Files?

Occasionally whenever a new config file comes along it gets saved as a pacnew extension and I know how to manage them with yaourt -c, but doing it that way either replaces the old one with the new one and setting all of my values back to default, leaving me to edit it manually or keeps the old file (among other options). Is there a way to apply the updates to the config files while keeping my original values?

Offline

#2 2011-08-01 05:07:45

jomasti
Member
From: USA
Registered: 2010-08-17
Posts: 96

Re: Merge Current and Pacnew Files?

Yaourt uses pacdiffviewer for that, right? I don't use it, so I'm not sure how it works. Does it not give you the option to show the differences? I personally use pacdiff from the pacman-contrib package. I think it's best to go through and decide what to keep or update rather than have any updates automatically applied.

Offline

#3 2011-08-01 05:07:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Merge Current and Pacnew Files?

brando56894 wrote:

Is there a way to apply the updates to the config files while keeping my original values?

No, because sometimes config changes in such a radical way that manual intervention is required.

Offline

#4 2011-08-01 05:14:59

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Merge Current and Pacnew Files?

@jomasti it actually uses vimdiff

@karol so I have to manually update the files each time? That's a pain in the ass...

Offline

#5 2011-08-01 05:19:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Merge Current and Pacnew Files?

brando56894 wrote:

@karol so I have to manually update the files each time? That's a pain in the ass...

1. Update less often.
2. Learn about the backup files so you don't alter the standard ones unnecessarily - you might prefer an extra file or two that won't generate .pacnew files rather than keep your settings in one file: e.g. modprobe.conf v. some other /etc/modprobe.d/*.conf

Offline

#6 2011-08-01 06:33:55

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Merge Current and Pacnew Files?

brando56894 wrote:

@karol so I have to manually update the files each time? That's a pain in the ass...

Not necessarily so if you know what you are doing. I regularly use vimdiff ro merge pacnew files. That way I can concentrate on the actual differences. Most times it is only a simple matter of copy and paste, occasionally also some deletion.

One gets used to it over time. You learn what you had altered and won't ever touch. And you learn to wager about differences. Just don't change anything you do not understand. Well, after all, this is the Arch way. I check docs, the developer forum if (seldom) needed, ask Google and follow this forum of course.

And never forget to keep backups before any change!

Last edited by bernarcher (2011-08-01 06:36:22)


To know or not to know ...
... the questions remain forever.

Offline

#7 2011-08-01 06:55:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Merge Current and Pacnew Files?

Offline

#8 2011-08-01 08:39:28

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Merge Current and Pacnew Files?

meld is another program which does a side by side comparison and you can make changes simply by clicking at sections you want to bring in.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#9 2011-08-01 14:44:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Merge Current and Pacnew Files?

You can pay sb to do it for you ;-)

Offline

#10 2011-08-02 11:44:09

estevao
Member
From: Vitória, ES - Brazil
Registered: 2009-10-13
Posts: 100
Website

Re: Merge Current and Pacnew Files?

Inxsible wrote:

meld is another program which does a side by side comparison and you can make changes simply by clicking at sections you want to bring in.

Yes, I think meld is a great solution for this.

Last edited by estevao (2011-08-02 11:45:00)

Offline

#11 2011-08-03 18:52:14

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Merge Current and Pacnew Files?

Thanks, I'll check it out.

Offline

Board footer

Powered by FluxBB