It is updating module dependencies. And it seems like either you are lacking the pacman-hook for depmod or it is for some reason not running.
In your installation log it seems like the hook is not executed.
Here in this part
reinstalling linux…
:: Running post-transaction hooks…
(1/3) Arming ConditionNeedsUpdate…
(2/3) Updating linux initcpios…
between Arming ConditionNeedsUpdate...
and Updating linux initcpios...
there should be the line Updating module dependencies...
which indicates that the hook /usr/share/libalpm/hooks/60-depmod.hook is run.
Please check if you have this hook-file.
It should look like that:
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/modules/*/
Target = !usr/lib/modules/*/?*
[Action]
Description = Updating module dependencies...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/depmod
NeedsTargets
And as you can see it executes the script /usr/share/libalpm/scripts/depmod which should look like that by default:
#!/bin/bash
while read -r f; do
if [[ -e ${f}modules.order ]]; then
depmod $(basename "$f")
elif [[ -d $f ]]; then
rm -f "${f}"modules.{alias,alias.bin,builtin.alias.bin,builtin.bin} \
"${f}"modules.{dep,dep.bin,devname,softdep,symbols,symbols.bin}
rmdir --ignore-fail-on-non-empty "$f"
fi
done
# vim:set ft=sh sw=2 et:
Edit: further information on depmod: https://man.archlinux.org/man/depmod.8.en