Regarding the merge of pacman.conf

Thanks, I have vim installed by preference, works the same right?
I think to compare and merge that file I must have at least vim installed…
I’m just asking because since I never touched those files in any way I post the question if I can just select the Overwrite option instead of Merge…

I started this thread for this exact purpose.
Pretty short thread (intentionally closed it very early to stay short and concise), covers why to not use merge, how to accomplish the change and why to do it in certain ways.

Maybe it will help. :slight_smile:

Never used vim to know if it behaves similar to meld

Meld shows both files and highlights any differences

1 Like

Exactly. The difference is the removal of community repo. Don’t worry if you have software from there, all is now moved in extra.

Ok. Then I just gonna Overwrite then, probably.
I do snapshots of the system regularly so if something goes wrong I can always go back.
I just wanna know if someone was in the same situation and if the overwrite option worked for them…

What I usually do if there is a pacnew:

Integrate the old settings into the pacnew and to use this file.

Please pardon my paranoia, but I always worried that this fell under the “don’t use sudo with GUI applications” advice.

As an alternative, on KDE Plasma I have recently been using kompare and kio-admin to merge .pacnew files without sudo.

kompare -c /etc/pacman.conf.pacnew admin:///etc/pacman.conf

It does.
If pacdiff -s is used then it would be fine and use temporary files, calling sudo to apply changes afterwards and not to the GUI application itself.

It also is somewhat related to those common env vars topic again.
ex:

EDITOR=/usr/bin/micro
SUDO_EDITOR=/usr/bin/micro
VISUAL=/usr/bin/kate
DIFFPROG=/usr/bin/meld

So then same benefit for single files:

sudoedit /etc/pacman.conf
# or
sudo -e /etc/pacman.conf

(open temp file to be applied to pacman.conf … uses micro from above settings)

Another way is to use gvfs or kio …

meld admin:////etc/pacman.conf.pacnew admin:////etc/pacman.conf

I actually patched pacdiff at one point to use gvfs/kio with a new function “(E)dit”.
But its somewhat redundant with the -s option. (as then “(V)iew” works fine for edits).

1 Like

I have already posted the simplest way I know of to check and merge both files
using admin:///etc/pacman.conf would still request password for root privileges

@Takkage - OP appears to be using Xfce not KDE

:wink:

It will then be xed admin://… Or gedit admin://…
Or just

sudo DIFFPROG=meld pacdiff

Manjaro Xfce has nano and mousepad text editors but users can install meld or konsole for comparing files or text editors micro, vim, emacs, xed, gedit if they prefer

Yes I’m using Manjaro XFCE and very happy with it!
So if I choose the Overwrite option is like revert to default settings in pacman and pamac settings will also revert to default too? Because I have AUR and Flatpaks support enabled.
For now everything working as it should and I do snapshots regularly so all ok for now, thanks all of you guys for your feedback regarding this subject, I hope this also help other people too, I think it was not just me with questions about this!
Once again thank you very much.

Btw i saw someone in the forum sugesting to do this instead:

sudo mv /etc/pacman.conf /etc/pacman.conf.pacsave
sudo mv /etc/pacman.conf.pacnew /etc/pacman.conf

Is this usefull too?

Its about equivalent to backing up the file first and then overwriting - with the additional caveat that tools like pacdiff will continue to have an entry because it handles all of those related extensions (pacnew, pacsave, pacorig). IE - if you ran pacdiff again you would be prompted for pacman.conf and pacman.conf.pacsave just as you had previously been with the pacnew.

1 Like

I see. Another question if I may, using those commmands do I need to run
sudo pacman -Syu "pacman>=6.0.2-11" before and sudo pacman -Sc after?
Also pamac revert to default settings right, and need to enable AUR and flatpak support again?

Is just ensuring you get the necessary set of updates (with the new pacman.conf and all)
Functionally you need to sync/update first, handle the pacnews, sync/update again (with the proper repos now), and clear out the old repo database (pacman -Sc).

1 Like

Ok, thanks for the explanation!

1 Like

Did all correctly, now community repo not showing anymore, all synced up with proper repos!
Pamac seems to retain his settings, AUR and Flatpak still enabled as it was before!
Thank you all for the help!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.