Pacman Error:.pacnew notify

After the Update 2023-07-17, I run

sudo pacman -Syu "pacman>=6.0.2-11"

than I used

DIFFPROG=meld pacdiff -s

as recommended by @cscs and used ‘override’ for all upcoming events (as I haven’t made any significant system changes before).
But now, whatever package I install or update by pacman

sudo pacman -S uget
warning: uget-2.2.3-6 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) uget-2.2.3-6

Total Installed Size:  1,27 MiB
Net Upgrade Size:      0,00 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                                  [-----------------------------------] 100%
(1/1) checking package integrity                                [-----------------------------------] 100%
(1/1) loading package files                                     [-----------------------------------] 100%
(1/1) checking for file conflicts                               [-----------------------------------] 100%
(1/1) checking available disk space                             [-----------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: Processing package changes...
(1/1) reinstalling uget                                         [-----------------------------------] 100%
:: Running post-transaction hooks...
(1/6) Arming ConditionNeedsUpdate...
(2/6) Refreshing PackageKit...
(3/6) Updating icon theme caches...
(4/6) .pacnew notify
error: command failed to execute correctly
(5/6) Checking which packages need to be rebuilt
(6/6) Updating the desktop file MIME type cache...

I always get that error, (error: command failed to execute correctly) if a new package is installed or updated,
while the functionality (install/remove) of Pacman itself is ok, as well as the system in general.
Is that error related to the overrides of
DIFFPROG=meld pacdiff -s
and if so I would need some help please.

Then problems may be expected.
There are a number of files that should not be blindly overwritten with upstream contents.
The sudoers, shadow, passwd files all come to mind.

But
I dont see any evidence of that here.

You have some hook you must have added trying to notify you of .pacnews … and it is failing.

ls /usr/share/libalpm/hooks/
ls /etc/pacman.d/hooks

Thanks a lot for you quick reply.
I don’ even have the knowledge to make a hook by myself.

ls /usr/share/libalpm/hooks/
00-timeshift-autosnap.hook     90-mkinitcpio-install.hook      gtk-query-immodules-2.0.hook
20-systemd-sysusers.hook       90-packagekit-refresh.hook      gtk-query-immodules-3.0.hook
30-systemd-binfmt.hook         90-update-appstream-cache.hook  gtk-update-icon-cache.hook
30-systemd-catalog.hook        99-grub.hook                    gvfsd.hook
30-systemd-daemon-reload.hook  dbus-reload.hook                locale-gen.hook
30-systemd-hwdb.hook           dconf-update.hook               manjaro-printer.hook
30-systemd-sysctl.hook         detect-old-perl-modules.hook    networkmanager-connectivity.hook
30-systemd-tmpfiles.hook       firefox-dev-post.hook           pacman-mirrors-install.hook
30-systemd-udev-reload.hook    firefox-dev-pre.hook            pacman-mirrors-upgrade.hook
30-systemd-update.hook         firefox-kde-post.hook           rebuild-detector.hook
30-update-mime-database.hook   firefox-kde-pre.hook            texinfo-install.hook
40-fontconfig-config.hook      firefox-post.hook               texinfo-remove.hook
40-update-ca-trust.hook        firefox-pre.hook                thunderbird-post.hook
60-depmod.hook                 fontconfig-32.hook              thunderbird-pre.hook
60-glibc-locales.hook          fontconfig.hook                 unbound-trusted-key.hook
60-mkinitcpio-remove.hook      gdk-pixbuf-query-loaders.hook   update-desktop-database.hook
70-dkms-install.hook           gio-querymodules-32.hook        update-vlc-plugin-cache.hook
70-dkms-upgrade.hook           gio-querymodules.hook           xorg-mkfontscale.hook
71-dkms-remove.hook            glib-compile-schemas.hook
80-cronie.hook                 gtk4-querymodules.hook

and

ls /etc/pacman.d/hooks
pacnew-chaser.hook

But by those output, I guess it’s pacnew-chaser (which I just installed out of curiosity), while that issue
DIFFPROG=meld pacdiff -s
really overwhelmed me (even so I use Linux for several years now).
Anyhow, thanks for your help.

That it is.
We dont really know why its failing. But it is.
Of course you can look at it, ex:

cat /etc/pacman.d/hooks/pacnew-chaser.hook

Its really just comparing files.
You have a file with some code in it, some of it pertaining to your system … like entries for your username, etc … a new file appears that looks similar, but now some lines have changed slightly and this new file also doesnt have your particulars like that username.
By comparing the files … you can understand how to either add your necessary information to the new file and use that … or add in the extra bits from the new file to your own.
pacnew’s generally get created because your system file does not match upstream perfectly … so instead of overwriting it you are presented with the new file so that you can make that comparative change yourself. This is by design … in order to preserve system configuration.
Ignoring them means you will not get new/compatible configs, and things will likely break at some point.
Blindly overwriting could remove important existing configurations, like sudo privileges, which may be akin to broken.
So please … compare the files as they are intended to be.

https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave

1 Like

Yes, I did use diff software sometimes, even under M$ a decade ago, but the content of some of those files did really overwhelm me and was beyond my knowledge and so I chose override (especially on my friends system with Manjaro Cinnamon and probably not maintained for a while - Timeshift and Backup Clone insured).
(I started PC’s with DOS 3,0 and got some basic knowledge over the decades, but I wonder how newbies managed that diff story?)

I would love to have your great knowledge.
Anyway, thanks a lot for being here on this forum.

1 Like

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