Good tutorial around pacnew needed

Timeshift can be found in the official repo. It’s pretty self-explanatory to set up.
If any questions occur - shoot. :slightly_smiling_face: :+1:

1 Like

The common pacnews seem to be fonts and locale. I think everyone has probably altered them but luckily I don’t think there’s much in them that can break anything

I use Meld

I open a Terminal (Konsole for me)

and I past this:

#!/bin/bash
#Merge new .pacnew configuration files with their originals
pacnew=$(find /etc -type f -name "
.pacnew") # Check if any .pacnew configurations are found
if [[ -z “$pacnew” ]]; then
echo " No configurations to update"
fi
for config in $pacnew; do # Diff original and new configuration to merge
kdesu meld ${config%.} $config &
wait # Remove .pacnew file?
while true; do
read -p " Delete “”$config""? (Y/n): " Yn
case $Yn in
[Yy]
) sudo rm “$config” &&
echo " Deleted “”$config""."
break ;;
[Nn]* ) break ;;
* ) echo " Answer (Y)es or (n)o." ;;
esac done
done

you have to be care, few .pacnew should never be merged, do a search in the old forum``

1 Like

Found a vid on Youtube. This thing is awsome to say the least! :slight_smile:

Well, that guy knows his way around linux :+1:
But beware that what was valid a couple years ago might not be today anymore. Make sure to check the comments on these videos. If in doubt, have a look at the github page, specifically the ‘issues’ section.

If ever needed, you can use terminal commands,

sudo timeshift --restore

is the one that usually saves me, chrooted and/or from tty…

1 Like

You need to use the CODE tags around scripts and similar texts if you want to share them, currently it is useless as people can’t copy paste it

I forgot to update partner’s system until today

I got this message during package updates

warning: /etc/locale.gen installed as /etc/locale.gen.pacnew

so I compared it in meld alongside the original locale.gen

sudo meld /etc/locale.gen /etc/locale.gen.pacnew

and found 3 differences:

this is a new locale (Iraq)
it is safe to add this to the original file as it is commented out by the #

meld2

this is the active locale setting and must not be replaced with the commented out entry in the .pacnew file. if this setting was commented out, there would be no active locale and system would not be happy about that

meld3

this is old section left behind from Calamares installer
it is all commented out and inactive, so it can be deleted

6 Likes

@nikgnomic, this is a pretty helpful example. I personally would appreciate if the forum has a special thread (or use the tutorial thread) where experienced users can show exemplarily how they solved this matter, so that newbies get an idea how to do it, at least on the long term.

3 Likes

i’ve some problem to get it working in this new forum,
now seems it ok?

I fiddled around with Meld (which was new to me) and quite like it. Is sudo meld the way to go when having to save a file in e.g. /etc or is it advisable to save it somewhere else and then manually sudo cp it? Might be a noob question but any thoughts on that?

Both this script and the little command posted above by @anon88624618 confuse me.
We already have this ability from pacdiff:

pacdiff -o

Using find or locate or similar is just going to be slower … and in this scripts case … apparently only look in /etc/ … which will certainly not find all pacnews.
Further that script uses kdesu which is odd …

1 Like

never used that, you may be right, I’m not expert like you, will try next time
that script taken long time ago in some meld wiki, I don’t remember exactly, always worked well for me…

now if i run

pacdiff -o

it will not show any pacnews elsewhere. where you may found them apart from /etc/?

Well there is the example of /boot/grub/grub.cfg recently… though an example of one you dont want to merge.
It could be literally anywhere in the system besides your home directory.
(though … /etc/ is the most common … because of what goes in /etc/)

1 Like

Sorry, just have a question to meld? If I already have meld installed, is it necessary to install pacdiffviewer in addition, or do both do the same? what else is necessary to install besides meld?

And what about kompare? I use KDE.

Not really necessary. Also it comes from AUR, which you need to be aware of. You can find .pacnew files on your system by typing pacdiff -o in the terminal. Then use meld to compare / edit if needed, then the .pacnew files can be removed.

1 Like

Here is the manual:

Meld - Help

2 Likes

i think this is a good visualization of the process,in addition to what @wongs wrote: