You are not logged in.
Hello,
What is the best way of dealing with .pacnew files? I believe there is some package which merges changes for you automatically? Pacman is great but dealing with .pacnew files can be a hassle.
Thanks.
Offline
I would use vimdiff:
vimdiff /etc/pacman.conf /etc/pacman.conf.pacnew
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
vimdiff needs installed right? Also can it be done with nano?
Offline
I think there is a program "pacdiffviewer" that comes with yaourt (best addition to pacman ever ). Also, I think there is a "pacdiff" script that comes in pacman-contrib. I believe either of those may work with .pacnew files. Although I haven't had any .pacnew files recently to see what happens.
Nai haryuvalyë melwa rë
Offline
How do I install any of these? I can't find vimdiff in the default repositories. I've heard a lot about yaourt - so it's an addon not a replacement for pacman?
Offline
I like pacdiff from pacman-contrib, but it uses vimdiff (at least by default). I use vim and vimdiff all the time though
I guess many advanced editors can have an equivalent feature by one way or another, I just don't know them.
And yaourt is a pacman wrapper, written in bash.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
just use the -d option
vim -d file1 file2
works exactly like vimdiff
Offline
Yaourt I believe is a wrapper for pacman. It has its own config file in /etc (don't remember what and not at my machine right now to check) that tells it what program to use. It defaults to pacman. You can also tell it to use pacman-color, which is pacman that has been patched with extra color output. So yaourt is just a wrapper for pacman. http://archlinux.fr/yaourt-en/
You can get yaourt by building in AUR or by adding archlinux.fr repos (easier than AUR). Instructions for adding that on the site i just mentioned. I like to use yaourt because it integrates AUR with everything.
pacdiffviewer comes with yaourt. pacdiff is in the pacman-contrib package which is in the community repo.
Nai haryuvalyë melwa rë
Offline
In yaourt-git, you can find a new feature for automerging of .pacnew files. Just add "AutoSaveBackupFile yes" in /etc/yaourtrc to use it later with yaourt -C.
Offline
vimdiff needs installed right? Also can it be done with nano?
Just for your information, vimdiff comes with vim
I don't know about nano, unfortunately.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
In yaourt-git, you can find a new feature for automerging of .pacnew files. Just add "AutoSaveBackupFile yes" in /etc/yaourtrc to use it later with yaourt -C.
This sounds just like what I'd want. Does yaourt-git come with yaourt?
Offline
wain wrote:In yaourt-git, you can find a new feature for automerging of .pacnew files. Just add "AutoSaveBackupFile yes" in /etc/yaourtrc to use it later with yaourt -C.
This sounds just like what I'd want. Does yaourt-git come with yaourt?
yaourt-git is the developement version of yaourt. You can install it with:
pacman -U http://projects.archlinux.fr/~wain/yaourt-git-20080816_0112-1-i686.pkg.tar.gz
Offline
RAH wrote:wain wrote:In yaourt-git, you can find a new feature for automerging of .pacnew files. Just add "AutoSaveBackupFile yes" in /etc/yaourtrc to use it later with yaourt -C.
This sounds just like what I'd want. Does yaourt-git come with yaourt?
yaourt-git is the developement version of yaourt. You can install it with:
pacman -U http://projects.archlinux.fr/~wain/yaourt-git-20080816_0112-1-i686.pkg.tar.gz
Done. So how do I go about using this rather than the usual pacman -Syu? Also can I get it to sort out my existing .pacnew files? Thanks.
Offline
meld is another tool to merge .pacnew files, its in the extra repo
http://meld.sourceforge.net/
Offline
The flags for yaourt are exactly the same as for pacman. So to update everything, "yaourt -Syu". To install something, "yaourt -S packagename". To search for something, "yaourt -Ss". The beauty of it is that it also searches thru AUR and installs from AUR. You can also upgrade your AUR packages with your normal update of everything: "yaourt -Syu --aur". I just put some aliases in my shell's rc file so I can be extra lazy in typing in the commands. Look at "man yaourt" for more info.
As far as merging the .pacnew files, check on http://wiki.archlinux.fr/howto:archlinu … ave_pacnew , but it sounds to me that at least with the -git version of yaourt, add "AutoSaveBackupFile yes" in /etc/yaourtrc. Then run "yaourt -C" and it will go through the .pacnew files and ask you what you want to do with them.
Nai haryuvalyë melwa rë
Offline
There is also pacdiff which is in pacman-contrib in [community]. Seems simpler than installing a whole new package manager just to simplify merging of *.pacnew files.
Offline
==> What do you want to do with /etc/inittab[.pacnew] ?
1: Show diffs with gvim in expert mode
2: Show diffs with vimdiff (in console)
3: Show diffs with kompare
4: Show diffs with kdiff3
5: gvim in EASY mode
6: Enter a command to edit
S: suppress .pacnew file
R: replace actual file by .pacnew
==> Press ENTER to return to menu
What should I be using? Isn't there some sort of auto-merge option?
Offline
Isn't there some sort of auto-merge option?
no, you can't be that lazy.
It requires some skill to look at the files and see the differences, then it needs a humans interaction to tell it what to do.
For the most part, you'd wanna upgrade to the new .pacnew file. But, what happens if you altered one of these files for a specific task only unique to your pc? You wouldn't wanna overwrite your changes with the new .pacnew file. Instead you would wanna alter the new .pacnew file with your old changes (if neccessary) and then
mv *.conf.pacnew *.conf
Offline
None of the options on the list do anything, I presume I need to install these various packages first?
Offline
None of the options on the list do anything, I presume I need to install these various packages first?
S and R don't do anything?
Offline
What should I be using? Isn't there some sort of auto-merge option?
auto-merge will only works next time. When a new .pacnew will come (thanks to AutoSaveBackupFile in yaourtrc) , yaourt will see the difference between those two version of .pacnew files and then will automerge them in your /etc/inittab file.
Be sure to have config files up to date the first time. Try to install "kdiff" or "kompare" or "vim", and do it manually.
Offline
RAH wrote:What should I be using? Isn't there some sort of auto-merge option?
auto-merge will only works next time. When a new .pacnew will come (thanks to AutoSaveBackupFile in yaourtrc) , yaourt will see the difference between those two version of .pacnew files and then will automerge them in your /etc/inittab file.
Be sure to have config files up to date the first time. Try to install "kdiff" or "kompare" or "vim", and do it manually.
So yaourt won't merge 'old' pacnew files, only ones that are being installed as the time of a -S operation?
Offline
wain wrote:RAH wrote:What should I be using? Isn't there some sort of auto-merge option?
auto-merge will only works next time. When a new .pacnew will come (thanks to AutoSaveBackupFile in yaourtrc) , yaourt will see the difference between those two version of .pacnew files and then will automerge them in your /etc/inittab file.
Be sure to have config files up to date the first time. Try to install "kdiff" or "kompare" or "vim", and do it manually.So yaourt won't merge 'old' pacnew files, only ones that are being installed as the time of a -S operation?
not really... Yaourt has to backup 2 version of each config file to make the merge. All you have to do is to enable AutoSaveBackupFile and use yaourt to install or upgrade package. Each config files will be saved automatically. From time to time, just run yaourt -C to check if .pacnew can be merged automatically.
Offline
To use meld in a loop:
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
I appreciate these instructions. I have screwed up my system taking the easy way out. I am used to using other distributions that do not create these files or at least I do not know about them. I have screwed up my system in that it would boot but then it would not recognize my keyboard or mouse so hard to use a system like this. To bad I did not find this before I screwed up my system again.
Offline