(Unnecessary?) Duplication of initcpio image generation when upgrading

Hi all,

I have noticed that sometimes when I upgrade my system (sudo pacman -Syu), when there is a case that initcpio images should be re-generated (in case of kernel updates, etc.), this is done twice (I don't mean the fallback image). I did not observe this behavior when I was using Arch Linux on my old laptop for the past 5 years.

Below you can find the terminal output of my most recent update which shows this situation:

https://bin.garudalinux.org/?d1ba8b1d739481fc#Dh5LfgKwswmfRyCDo6JBBH5zmJfT13xvwBWEw8XW3cCT

As you can see, initcpio images are generated twice. Once after "( 5/12) Updating linux initcpios..." step and then a second time after "( 8/12) mkinitcpio and grub update after transaction." step.

Do you have any idea why it happens this way? Is this normal behavior for Garuda Linux or maybe Garuda pacman post-transaction hooks need some optimization?

Disclaimer: I installed my Garuda Linux using garuda-kde-barebones-linux-lts-210225.iso, a few days after it was released (and I update it regularly almost every day). I know barebones edition has no support, but I believe this should be a common problem (if it indeed is a problem) for all Garuda editions.

The only changes I made after installation was installing linux-zen (and removing linux-lts) and removing most Garuda apps/packages except for garuda-common-settings package (and its dependencies of course) which means I have garuda-hooks (dependency for garuda-common-settings) untouched just like other Garuda editions.

And for completeness, here is my "inxi -Fxxxza" output: (taken right after the above update and before rebooting)

https://bin.garudalinux.org/?a68f85cb7e493d6f#Gbf8z9aYkZZrL72BPwYverRQ7Ex4H8sjrLQoXpt6uUS6

It is because sometimes the mkinitcpio do not run after an update so we make sure to run it to avoid problems
It doesn't hurt to run it multiple times

8 Likes

The first run is due to a hook in linux-zen. The second is due to a Garuda-specific hook run after a kernel update.

There is no current implementation for deduplication of hook functionality within pacman and libalpm. You can disable the kernel post-update hook if you want to.

4 Likes

Thank you both for your quick response. In that case, this is normal behavior for Garuda then. Glad to hear nothing is wrong with my setup.

1 Like

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