You are not logged in.

#1 2010-03-21 08:15:56

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

[SOLVED] .pacsave and .pacnew files and what to do with them...

Hey Archers,

So I performed a system upgrade and got a couple warning messages similar to: "file" was saved as "file.pacsave" (where file is some actual filename).

From what i understand, pacman has made a backup of "file" if it was previously modified, right?

Ok, so i figured I would go to the directory of the "file" to see what's up.  Here's what I don't get: once I'm in the directory, I see something similar to "file.pacnew" and "file.pacsave" but I don't see any plain "file".

What does this mean? Was there no "file" to begin with? For example, one of the files i'm having this issue with is the "crond" file. When i navigate to it's location, there is no "crond" file, i only see "crond.pacnew" and "crond.pacsave".

What should I do with these files? The .pacnew version has a more stuff in it. Do I have to rename "file.pacnew" files to "file"? Or should i rename the .pacsave files instead? Is there supposed to be a plain "file" there in the first place?

For another file called "man-db" i actually still do see a plain "man-db" file in it's location, but there is now also a "man-db.pacnew" as well. Shall i merge/replace the original file with the pacnew version in this case?

Thanks for the help!:rolleyes:

Last edited by trusktr (2010-03-21 19:49:40)


joe@trusktr.io - joe at true skater dot io.

Offline

#2 2010-03-21 08:18:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

It is explained in pretty thorough detail here: http://wiki.archlinux.org/index.php/Pac … save_Files


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2010-03-21 08:48:04

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

alright, cool, thanks jason. I read it. One thing that is not mentioned though is what happens when you manually merge a file: will the new file have the appropriate checksums for the next time you upgrade, or will you always have to edit this file from now on, forever (unless you use the .pacnew file to replace the old file)?

Last edited by trusktr (2010-03-21 08:48:37)


joe@trusktr.io - joe at true skater dot io.

Offline

#4 2010-03-21 17:50:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

If you upgrade a package, and the devs have changed a relevant config file - say added a new field(s), then it will be accompanied by a .pacnew.  It is then your responsibility to review the difference and accept any changes into your config file (and delete the .pac* file if you are keeping your system clean). Just using .pacnew and deleting the original would only be an option if you had made no changes to it.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2010-03-21 18:07:03

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

When you end up with foo.pacnew and foo.pacsave but no plain foo, I think the file has been removed from the package. At some point it was altered so a .pacnew file was created (which is not tracked by pacman), and when it was removed, a .pacsave file was also created (this way you don't lose settings when configuration files get moved around within a package).

I would figure out which package created those files, then move them somewhere else and re-install the package. If you don't find "foo" in the package, you can probably delete foo.pacnew and foo.pacsave.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2010-03-21 18:36:12

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

Thanks jason. smile

Hey Xyne, so i renamed my crond.pacnew to crond (there was no crond before).  I don't really know if i need it. I've never messed with it before.

Mine looks like this:

/var/log/crond.log {
   sharedscripts
   copytruncate
   missingok
   postrotate
       kill -HUP `cat /var/run/cron.pid`
   endscript
}

and it's in the /etc/logrotate.d/ directory.  Think I may need it? I have no idea what that stuff means. hehe I just started using Linux just over a month ago with Arch! wooo!! smile


joe@trusktr.io - joe at true skater dot io.

Offline

#7 2010-03-21 19:17:08

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

Next time, don't cross post.


.:[My Blog] || [My GitHub]:.

Offline

#8 2010-03-21 19:47:50

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

Sorry, i didn't know i was cross-posting. In this thread i was trying to understand what the pacnew and pacsave files were for, and in the other i had issues with actually merging a specific file with the pacnew. But i guess they're similar topics! roll


joe@trusktr.io - joe at true skater dot io.

Offline

#9 2010-03-21 20:08:48

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

trusktr, you should know better than to create two posts that have several words in common. How are people who don't actually read them supposed to know that they're different? Really, you have to keep in mind that many people here are also /.ers. tongue


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#10 2010-03-22 00:26:03

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: [SOLVED] .pacsave and .pacnew files and what to do with them...

hehe, uhhhh, /.ers = slashers? lol


joe@trusktr.io - joe at true skater dot io.

Offline

Board footer

Powered by FluxBB