Crash during update - how to find out if update was completed successfully before crash?

#1

Hi,
Today i had a crash during the testing update. Maybe the update was already finished, maybe not..
How do I find out if the update was completed successfully before the crash?

in /var/log/pamac.log
there is no line success at the end?

update
[2019-05-15 10:50] [PAMAC] synchronizing package lists
[2019-05-15 10:52] [ALPM] transaction started
[2019-05-15 10:52] [ALPM] upgraded librsvg (2:2.44.13-1 -> 2:2.44.14-1)
[2019-05-15 10:52] [ALPM] upgraded mesa (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:52] [ALPM] upgraded audacity (1:2.3.1-1 -> 1:2.3.2-1)
[2019-05-15 10:52] [ALPM] upgraded imagemagick (7.0.8.44-1 -> 7.0.8.45-1)
[2019-05-15 10:52] [ALPM] upgraded lib32-librsvg (2.44.13-1 -> 2.44.14-1)
[2019-05-15 10:52] [ALPM] upgraded lib32-libva-mesa-driver (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:52] [ALPM] upgraded lib32-mesa (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:52] [ALPM] upgraded lib32-mesa-vdpau (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:52] [ALPM] upgraded lib32-vulkan-intel (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:52] [ALPM] upgraded lib32-vulkan-radeon (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:52] [ALPM] upgraded libva-mesa-driver (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:53] [ALPM] upgraded linux316 (3.16.65-1 -> 3.16.67-1)
[2019-05-15 10:53] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
[2019-05-15 10:53] [ALPM] upgraded mesa-vdpau (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:53] [ALPM] upgraded metis (5.1.0.p5-1 -> 5.1.0.p6-1)
[2019-05-15 10:53] [ALPM] upgraded soundconverter (3.0.0-3 -> 3.0.2-1)
[2019-05-15 10:53] [ALPM] upgraded thunar-gtk3 (1.8.4-5 -> 1.8.4-6)
[2019-05-15 10:53] [ALPM] upgraded vpnc (1:0.5.3.r454.r67-1 -> 1:0.5.3.r458.r73-1)
[2019-05-15 10:53] [ALPM] upgraded vulkan-intel (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:53] [ALPM] upgraded vulkan-radeon (19.0.3-1 -> 19.0.4-1)
[2019-05-15 10:53] [ALPM] upgraded xfce4-panel-gtk3 (4.13.4-3 -> 4.13.4-4)
[2019-05-15 10:53] [ALPM] upgraded xfce4-session-gtk3 (4.13.1-8 -> 4.13.1-10)
[2019-05-15 10:53] [ALPM] upgraded xfdesktop-gtk3 (4.13.3-2 -> 4.13.3-3)
[2019-05-15 10:53] [ALPM] upgraded xfwm4-gtk3 (4.13.1-12 -> 4.13.1-13)
[2019-05-15 10:53] [ALPM] transaction completed
[2019-05-15 10:53] [ALPM] running '90-linux316.hook'...
[2019-05-15 10:53] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux316.preset: 'default'
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-3.16-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-3.16-x86_64.img
[2019-05-15 10:53] [ALPM-SCRIPTLET] ==> Starting build: 3.16.67-1-MANJARO
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [autodetect]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [keymap]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [resume]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2019-05-15 10:53] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2019-05-15 10:53] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-3.16-x86_64.img
[2019-05-15 10:53] [ALPM-SCRIPTLET] ==> Image generation successful
[2019-05-15 10:53] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux316.preset: 'fallback'
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-3.16-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-3.16-x86_64-fallback.img -S autodetect
[2019-05-15 10:53] [ALPM-SCRIPTLET] ==> Starting build: 3.16.67-1-MANJARO
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2019-05-15 10:53] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2019-05-15 10:54] [ALPM-SCRIPTLET]   -> Running build hook: [keymap]
[2019-05-15 10:54] [ALPM-SCRIPTLET]   -> Running build hook: [resume]
[2019-05-15 10:54] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2019-05-15 10:54] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2019-05-15 10:54] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-3.16-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] ==> Image generation successful
[2019-05-15 10:54] [ALPM] running '99-grub.hook'...
[2019-05-15 10:54] [ALPM-SCRIPTLET] Generating grub configuration file ...
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found theme: /usr/share/grub/themes/manjaro/theme.txt
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-5.1-x86_64
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.1-x86_64.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-5.1-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-5.0-x86_64
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.0-x86_64.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-5.0-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-4.20-x86_64
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.20-x86_64.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-4.20-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-4.19-x86_64
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.19-x86_64.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-4.14-x86_64
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.14-x86_64.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-4.14-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-4.4-x86_64
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.4-x86_64.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-4.4-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-3.18-x86_64
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-3.18-x86_64.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-3.18-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-3.16-x86_64
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-3.16-x86_64.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-3.16-x86_64-fallback.img
[2019-05-15 10:54] [ALPM-SCRIPTLET] Found memtest86+ image: /boot/memtest86+/memtest.bin
[2019-05-15 10:55] [ALPM-SCRIPTLET] done
[2019-05-15 10:55] [ALPM] running 'detect-old-perl-modules.hook'...
[2019-05-15 10:55] [ALPM] running 'gdk-pixbuf-query-loaders-32.hook'...
[2019-05-15 10:55] [ALPM] running 'gdk-pixbuf-query-loaders.hook'...
[2019-05-15 10:55] [ALPM] running 'glib-compile-schemas.hook'...
[2019-05-15 10:55] [ALPM] running 'gtk-update-icon-cache.hook'...
[2019-05-15 10:55] [ALPM] running 'manjaro-xfce-settings.hook'...
[2019-05-15 10:55] [ALPM-SCRIPTLET] '/usr/share/backgrounds/xfce/illyria-default.jpg' -> '/usr/share/backgrounds/illyria-default.jpg'
[2019-05-15 10:55] [ALPM-SCRIPTLET] '/usr/share/backgrounds/xfce/illyria-default-lockscreen.jpg' -> '/usr/share/backgrounds/illyria-default-lockscreen.jpg'
[2019-05-15 10:55] [ALPM] running 'systemd-daemon-reload.hook'...
[2019-05-15 10:55] [ALPM] running 'systemd-update.hook'...
[2019-05-15 10:55] [ALPM] running 'update-desktop-database.hook'...
[2019-05-15 10:55] [ALPM] running 'update-mime-database.hook'...

I think

[2019-05-15 10:55] [ALPM] running 'update-mime-database.hook'...

was not the end?

[Testing Update] 2019-05-15 - Deepin, Mesa, Linux316, XFCE
#2

The hooks are executed at the very end. This means all packages are updated successfully. However there is a possibility that a hook was not executed before the crash.

Since the hooks are only in two places and run in alphabetical order, it is easy to find out. Look on
/etc/pacman.d/hooks and /usr/share/libalpm/hooks/ for hooks that would run after update-mime-database.hook . Check the triggers if the conditions are matched for this update. If a trigger condition matches files or packages in this update run the command.

1 Like
#3

Thanx!
This were the finished hooks of pamac

[2019-05-15 10:55] [ALPM] running 'detect-old-perl-modules.hook'...
[2019-05-15 10:55] [ALPM] running 'gdk-pixbuf-query-loaders-32.hook'...
[2019-05-15 10:55] [ALPM] running 'gdk-pixbuf-query-loaders.hook'...
[2019-05-15 10:55] [ALPM] running 'glib-compile-schemas.hook'...
[2019-05-15 10:55] [ALPM] running 'gtk-update-icon-cache.hook'...
[2019-05-15 10:55] [ALPM] running 'manjaro-xfce-settings.hook'...
[2019-05-15 10:55] [ALPM-SCRIPTLET] '/usr/share/backgrounds/xfce/illyria-default.jpg' -> '/usr/share/backgrounds/illyria-default.jpg'
[2019-05-15 10:55] [ALPM-SCRIPTLET] '/usr/share/backgrounds/xfce/illyria-default-lockscreen.jpg' -> '/usr/share/backgrounds/illyria-default-lockscreen.jpg'
[2019-05-15 10:55] [ALPM] running 'systemd-daemon-reload.hook'...
[2019-05-15 10:55] [ALPM] running 'systemd-update.hook'...
[2019-05-15 10:55] [ALPM] running 'update-desktop-database.hook'...
[2019-05-15 10:55] [ALPM] running 'update-mime-database.hook'...

/etc/pacman.d/
has no hook.

[...pacman.d]$ ls
gnupg  mirrorlist
/usr/share/libalpm/hooks
[... hooks]$ ls -l
-rw-r--r-- 1 root root 310 May 11 11:32 60-linux414.hook
-rw-r--r-- 1 root root 308 May 10 22:52 60-linux419.hook
-rw-r--r-- 1 root root 308 Mar 19 19:07 60-linux420.hook
-rw-r--r-- 1 root root 304 May 10 21:50 60-linux50.hook
-rw-r--r-- 1 root root 302 May 11 14:12 60-linux51.hook
-rw-r--r-- 1 root root 238 May 14 09:12 90-linux316.hook
-rw-r--r-- 1 root root 241 May 11 11:32 90-linux414.hook
-rw-r--r-- 1 root root 241 May 10 22:52 90-linux419.hook
-rw-r--r-- 1 root root 241 Mar 19 19:07 90-linux420.hook
-rw-r--r-- 1 root root 235 Apr 27 20:54 90-linux44.hook
-rw-r--r-- 1 root root 238 May 10 21:50 90-linux50.hook
-rw-r--r-- 1 root root 238 May 11 14:12 90-linux51.hook
-rw-r--r-- 1 root root 238 Apr 27 22:58 98-linux318.hook
-rw-r--r-- 1 root root 203 May 11 09:42 99-grub.hook
-rw-r--r-- 1 root root 250 Apr 19 04:06 dconf-update.hook
-rw-r--r-- 1 root root 224 Apr 20 10:22 detect-old-perl-modules.hook
-rw-r--r-- 1 root root 312 Dec 22 02:54 firefox-dev-post.hook
-rw-r--r-- 1 root root 277 Dec 22 02:54 firefox-dev-pre.hook
-rw-r--r-- 1 root root 275 Dec 22 02:54 firefox-kde-post.hook
-rw-r--r-- 1 root root 254 Dec 22 02:54 firefox-kde-pre.hook
-rw-r--r-- 1 root root 258 Dec 22 02:54 firefox-post.hook
-rw-r--r-- 1 root root 241 Dec 22 02:54 firefox-pre.hook
-rw-r--r-- 1 root root 222 Oct  5  2018 fontconfig-32.hook
-rw-r--r-- 1 root root 212 Oct  5  2018 fontconfig.hook
-rw-r--r-- 1 root root 285 Feb 28 17:36 gdk-pixbuf-query-loaders-32.hook
-rw-r--r-- 1 root root 273 Feb 28 17:30 gdk-pixbuf-query-loaders.hook
-rw-r--r-- 1 root root 307 Apr 24 21:34 ghc-register.hook
-rw-r--r-- 1 root root 309 Apr 24 21:34 ghc-unregister.hook
-rw-r--r-- 1 root root 259 May  7 14:02 gio-querymodules-32.hook
-rw-r--r-- 1 root root 245 May  3 22:53 gio-querymodules.hook
-rw-r--r-- 1 root root 338 May  3 22:53 glib-compile-schemas.hook
-rw-r--r-- 1 root root 267 Jan  9  2018 gtk-query-immodules-2.0.hook
-rw-r--r-- 1 root root 278 Apr 13 10:22 gtk-query-immodules-3.0-32.hook
-rw-r--r-- 1 root root 266 Apr 13 08:46 gtk-query-immodules-3.0.hook
-rw-r--r-- 1 root root 286 Apr 11 01:12 gtk-update-icon-cache.hook
-rw-r--r-- 1 root root 232 Apr 19 22:26 gvfsd.hook
-rw-r--r-- 1 root root 239 May 12 08:26 manjaro-xfce-settings.hook
-rw-r--r-- 1 root root 341 Feb 17 13:32 mktexlsr.hook
-rw-r--r-- 1 root root 275 Apr 22 10:32 pacman-mirrors-install.hook
-rw-r--r-- 1 root root 275 Apr 22 10:32 pacman-mirrors-upgrade.hook
-rw-r--r-- 1 root root 239 May 11 13:13 systemd-binfmt.hook
-rw-r--r-- 1 root root 254 May 11 13:13 systemd-catalog.hook
-rw-r--r-- 1 root root 265 May 11 13:13 systemd-daemon-reload.hook
-rw-r--r-- 1 root root 246 May 11 13:13 systemd-hwdb.hook
-rw-r--r-- 1 root root 244 May 11 13:13 systemd-sysctl.hook
-rw-r--r-- 1 root root 246 May 11 13:13 systemd-sysusers.hook
-rw-r--r-- 1 root root 241 May 11 13:13 systemd-tmpfiles.hook
-rw-r--r-- 1 root root 261 May 11 13:13 systemd-udev-reload.hook
-rw-r--r-- 1 root root 227 May 11 13:13 systemd-update.hook
-rw-r--r-- 1 root root 281 Mar  8 22:58 texinfo-install.hook
-rw-r--r-- 1 root root 285 Mar  8 22:58 texinfo-remove.hook
-rw-r--r-- 1 root root 348 Feb 17 13:32 texlive-fmtutil.hook
-rw-r--r-- 1 root root 278 Feb 17 13:32 texlive-updmap.hook
-rw-r--r-- 1 root root 274 Dec 22 02:54 thunderbird-post.hook
-rw-r--r-- 1 root root 246 Dec 22 02:54 thunderbird-pre.hook
-rw-r--r-- 1 root root 243 Nov  9  2018 update-ca-trust.hook
-rw-r--r-- 1 root root 263 Apr 18  2018 update-desktop-database.hook
-rw-r--r-- 1 root root 255 Jan 27 19:05 update-mime-database.hook
-rw-r--r-- 1 root root 247 Apr  1 22:37 update-vlc-plugin-cache.hook
-rw-r--r-- 1 root root 288 Mar 21 18:29 xorg-mkfontscale.hook

Is there a way to trigger all hooks at once? Or redo the todays updates?

Like reinstall all packages of the day?

Reinstall all packages

pacman -Syu $(pacman -Qqen)

#4

Your own pacman hooks are stored in /etc/pacman.d/hooks . If you don't see this folder, it just means you didn't create own hooks. This is not a problem.

You can try a reinstall of today's update packages. But this does not mean that a update Hook is executed.

Your last hook was "update-mime-database.hook" . This means there can't be many hooks that would run after this one. Simply check them manually.

Your ls command in /usr/share/libalpm/hooks is not really optimal to find which hooks you need to check. You might want to use

LC_ALL=C \ls -l

This should show the order in which the hooks are executed.

1 Like
#5

Yes there are only 2 :slight_smile:

-rw-r--r-- 1 root root 255 Jan 27 19:05 update-mime-database.hook
-rw-r--r-- 1 root root 247 Apr  1 22:37 update-vlc-plugin-cache.hook
-rw-r--r-- 1 root root 288 Mar 21 18:29 xorg-mkfontscale.hook

I've tough ls -ltr shows the last changed..

#6

OK so which is the hook command?

#7

This is true. But it is not what is important. A hook file can be execute even if the package that contains this file is not part of an update.

check the hook file

cat update-vlc-plugin-cache.hook

Then check it is would apply for an upgrade and if the "Target" changed during the update. If yes run the command listed in "Exec" . The command is usually ran as root. If you unsure do not run the command.

1 Like
#8

If failure occurred during mime you might want to rerun that as well, not just everything after.

1 Like
#9

This are the three ones..

cat update-vlc-plugin-cache.hook

[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/vlc/plugins/*

[Action]
Description = Updating the vlc plugin cache...
When = PostTransaction
Exec = /usr/lib/vlc/vlc-cache-gen /usr/lib/vlc/plugins

cat update-mime-database.hook

[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/share/mime/packages/*.xml

[Action]
Description = Updating the MIME type database...
When = PostTransaction
Exec = /usr/bin/update-mime-database /usr/share/mime

cat xorg-mkfontscale.hook


[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/share/fonts/*/
Target = !usr/share/fonts/encodings/*

[Action]
Description = Updating X fontdir indices...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/xorg-mkfontscale
NeedsTargets

So:
cd /usr/share/libalpm/scripts/
[.. scripts]$ ls
dconf-update detect-old-perl-modules.sh gtk-update-icon-cache mktexlsr pacman-mirrors-install pacman-mirrors-upgrade systemd-hook texlive-fmtutil texlive-updmap xorg-mkfontscale
[... scripts]$ sudo ./xorg-mkfontscale

#10

First Post

Do you have any indication that this hook did not run?

The other two. Just check it if the conditions match to this update.

No! If you think the conditions match for this update execute the command in "Exec".

#11

Ok now i am confused, i've thought these 2 or 3 were not run?
i dont know, maybe just run them again?

#12

Pacman tests if the conditions in the hook matches changes with this update. If the conditions matches it will run, if not it will not run. Only if pacman runs a hook it will be printed in the log.

If you don't know don't run it.

#13

I am sorry i don't get it. How do i execute in EXEC ?

#14

If you can't recognise the command in the "Exec" line of the hook files, it is better you don't execute anything at this point.

Assume the update was successful. There is no indication the update was not successful. The 2 or maybe 3 Hooks are not important in any way. Just leave it as it is.

#15

hahaha yup, that thought crossed my mind too :smile: . I quess at the next testing updates, these 2-3 will be hooked again :wink:

thanx for your help.