Mkinitcpio always runs twice when updating system

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Mkinitcpio always runs twice when updating system

Postby mbakhterev » Fri Aug 20, 2021 2:07 pm

Hello, World!

When updating system with

$this->bbcode_second_pass_code('', 'pacman -Syu')

when it leads to updating packages involving in the system initialization process my system always runs mkinitcpio twice

$this->bbcode_second_pass_code('', '
(4/9) Updating linux-aarch64 initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-aarch64.preset: 'default'
-> -k 5.11.4-1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.11.4-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> WARNING: No modules were added to the image. This is probably not what you want.
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-aarch64.preset: 'fallback'
-> -k 5.11.4-1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 5.11.4-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: wd719x
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
(5/9) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-aarch64.preset: 'default'
-> -k 5.11.4-1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.11.4-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> WARNING: No modules were added to the image. This is probably not what you want.
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-aarch64.preset: 'fallback'
-> -k 5.11.4-1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 5.11.4-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: wd719x
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
')

The only difference is in the lines

$this->bbcode_second_pass_code('', '
(4/9) Updating linux-aarch64 initcpios...
(5/9) Updating linux initcpios...
')

It looks like some misconfiguration, but i don't know where to look for corresponding settings. Is it possible to fix this?

- MB. Respectfully
mbakhterev
 
Posts: 22
Joined: Mon Oct 14, 2019 4:45 pm

Re: Mkinitcpio always runs twice when updating system

Postby ufo6000 » Fri Aug 20, 2021 7:06 pm

ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: Mkinitcpio always runs twice when updating system

Postby pogojotz » Tue Aug 24, 2021 9:57 pm

Try running pacman with `-v` and/or `--debug`, maybe that could give you us some hint.

I could imagine, that some package requests the rebuild for "linux-aarch64" and another for "linux", which is in the linux-aarch64 Provides-list. Since the names are different, it might not be resolved correctly by pacman. If so, these packages could be identified and reported to the maintainers.
pogojotz
 
Posts: 9
Joined: Thu Nov 02, 2017 9:36 am

Re: Mkinitcpio always runs twice when updating system

Postby mxr » Wed Aug 25, 2021 3:22 pm

IMHO this is a packaging error, `linux-aarch64` (other kernel packages for have corresponding files) provides `/usr/share/libalpm/hooks/60-linux-aarch64.hook` (which removes old initcpio) and `/usr/share/libalpm/hooks/90-linux-aarch64.hook` (build new initcpio). Mainstream archlinux provided these in the same manner for each kernel variant, but moved to a more general script provided by `mkinitcpio` (`/usr/share/libalpm/hooks/60-mkinitcpio-remove.hook` and `/usr/share/libalpm/hooks/60-mkinitcpio-install.hook`).

Short: ArchARM updated `mkinitcpio` but stopped updating the kernel packages (still on version 5.11). I suppose the easy fix is to simply delete `/usr/share/libalpm/hooks/{60,90}-linux-aarch64.hook`.
mxr
 
Posts: 8
Joined: Sat Mar 27, 2021 1:32 pm

Re: Mkinitcpio always runs twice when updating system

Postby ufo6000 » Fri Aug 27, 2021 2:01 pm

Thanks very much for pointing out the root cause !

I think deletion of the hooks will not work permanently, during next linux update the hooks got reinstalled as long as ArchARM does not update the hooks:

$this->bbcode_second_pass_code('', '
[$ pacman -Qo /usr/share/libalpm/hooks/60-linux*
/usr/share/libalpm/hooks/60-linux-aarch64.hook is owned by linux-aarch64 5.11.4-1
[$ pacman -Qo /usr/share/libalpm/hooks/90-linux*
/usr/share/libalpm/hooks/90-linux-aarch64.hook is owned by linux-aarch64 5.11.4-1
')

$this->bbcode_second_pass_code('', '
$ pacman -Qo /usr/share/libalpm/hooks/60-linux*
/usr/share/libalpm/hooks/60-linux-raspberrypi.hook is owned by linux-raspberrypi 5.10.59-1
$ pacman -Qo /usr/share/libalpm/hooks/90-linux*
/usr/share/libalpm/hooks/90-linux-raspberrypi.hook is owned by linux-raspberrypi 5.10.59-1
')
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 25 guests