You are not logged in.

#1 2006-12-16 18:53:15

delphinen
Member
Registered: 2006-10-02
Posts: 67

.pacnew files

Everytime I upgrade with pacman, these files are created; I thought they would have some format changes between the old .conf files, but I couldnt find any important change, or change at all, with my original .conf files, so I would like to ask if its safe to delete them (rm /etc/*.pacnew)

thanks in advance

Offline

#2 2006-12-16 19:36:38

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: .pacnew files

if there's no difference its ok to delete them. .pacnew are new config files that come along with the package. Its not smart enough to discriminate a needed change, they're just placed there with that extension.

Offline

#3 2006-12-17 02:21:04

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: .pacnew files

If you've made custome modifications of the config file and the new package has a different config format than the last, only then will it create the <code>.pacnew</code> files.  Here are all the config file situations and how they are handled (from <code>man pacman</code>):

HANDLING CONFIG FILES
       pacman  uses  the  same  logic as rpm to determine action against files
       that are designated to be backed up.  During an upgrade, it uses 3  md5
       hashes  for  each backup file to determine the required action: one for
       the original file installed, one for the new file that's  about  to  be
       installed,  and  one  for  the  actual file existing on the filesystem.
       After comparing these 3 hashes, the follow scenarios can result:

       original=X, current=X, new=X
              All three files are the same, so we win either way.  Install the
              new file.

       original=X, current=X, new=Y
              The current file is un-altered from the original but the new one
              is different.  Since the user did not ever modify the file,  and
              the  new  one  may contain improvements/bugfixes, we install the
              new file.

       original=X, current=Y, new=X
              Both package versions contain the exact same file, but  the  one
              on  the  filesystem  has  been modified since.  In this case, we
              leave the current file in place.

       original=X, current=Y, new=Y
              The new one is identical to the current one.  Win win.   Install
              the new file.

       original=X, current=Y, new=Z
              All three files are different, so we install the new file with a
              .pacnew extension and warn the user, so she  can  manually  move
              the file into place after making any necessary customizations.

Offline

#4 2006-12-17 20:38:29

delphinen
Member
Registered: 2006-10-02
Posts: 67

Re: .pacnew files

ok, thanks; so I think its better to not delete them

Offline

#5 2006-12-17 21:53:53

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: .pacnew files

Right...basically you should compare it to what you currently have and see how to make the same customizations with the newer format.  Some times it's just a minor version number or something that has changed and nothing serious.  If that's the case you can feel free to delete the .pacnew files and continue on your way.  Otherwise you should not just ignore them, but actually take the time to merge your customizations to the new format and then remove the extra file...

Offline

Board footer

Powered by FluxBB