• How to deal with .pacnew ?


    Hello,

    After reading the wikis I can’t get clever…

    I have few .pacnew that I don’t realy know how to integrate them, per exemple :

    /etc/mkinitcpio.conf.pacnew
    /etc/passwd.pacnew
    /etc/group.pacnew

    In mkinitcpio.conf.pacnew there are now ( ) instead of " " for the options, do I have just to put the same option between the ().
    I normaly just copy the differences from the .conf file to the .pacnew and rename then conf > .conf.old, .pacnew > .conf.

    Thanks for your advices.

  • All the info you will need is found here: Pacman/Pacnew and Pacsave

    Personally I just use pacdiff since it is incorperated into pacman, make sure to install vimdiff first. Then just simple run sudo pacdiff. It will show you the pacnew files, you can compare, copy changes, replace with the pacnew, or delete pacnew. What you will need to do with the pacnew files however depend upon each file, so you will have to choose the right option for you.

  • Thanks for the link @spinvis , it clears things quite a lot.

    Anyway, one must be very careful when messing with /etc/passwd and /etc/group - you’ll want to be able to log in.

  • It’s not always enough to just replace existing files with the new ones. Old files may contain some personalizations, which could be lost.

    • mkinitcpio.conf is a trival case. Yes, it’s enough to replace opening and closing double-quotes with parenthesis

    • passwd, in my case, has 16 more entries than passwd.pacnew. I have no intention to loose them. No changes proposed for already existing entries.

    • group, in my case, has 17 more entries than group.pacnew. I don’t want to loose them. 8 from the old entries have my username (just) added to other existing lists. I don’t want to loose them either.

    Use some automated tools to find out the differences between existing and new files. Good graphical ones are kompare (kde) and meld (gtk).

  • @spinvis : Your link is the content that I saw this morning and had a spontaneous headache… :mask: :laughing:

    @manuel : Yep, that’s the reason for the question, I don’t want to spend 5 hours reparing that fruits salade.

    @just : Thanks for the mkinitcpio.conf info, I was suspecting the same.
    For groups, I’m in the same case, more entries than the .pacnew one. Anyway, I’m going to see all this soup in details and put solved as soon I as made.

    Thanks a lot for yours answers.

  • I use the GUI tool that @just suggested, meld. Launch as root from terminal, select the two files you want to compare, and it’s point and click to merge changes. Save when finished, then delete the .pacnew files. It’s best practice to back up each of your files before making changes.
    http://meldmerge.org/help/file-mode.html

pacnew1 deal1 Posts 6Views 173
Log in to reply