CI: mkosi-mainline: Workaround 'dpkg: error: dpkg frontend lock'

Mkosi's own dracut hook, which is triggered from `dpkg -i`, calls
`dpkg-reconfigure` causing dpkg frontend lock conflict. But `initrd.img`
is generated correctly. Workaround by ignoring `dpkg-reconfigure` errors
in the hook.

  dpkg: error: dpkg frontend lock was locked by another process with pid 5
  Note: removing the lock file is always wrong, can damage the locked area
  and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ#db-lock>.
  run-parts: /etc/kernel/postinst.d/zz-systemd-boot exited with return code 2

Link: https://github.com/lkrg-org/lkrg/issues/283
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
This commit is contained in:
Vitaly Chikunov 2023-08-03 06:05:59 +03:00 committed by Solar Designer
parent 55d28c9f23
commit 47191f9b29

View file

@ -20,6 +20,7 @@ jobs:
run: |
sudo python3 -m pip install git+https://github.com/systemd/mkosi.git@v14
sudo sed -i 's/linux-generic/linux-virtual/' /usr/local/lib/python*/dist-packages/mkosi/__init__.py
sudo sed -i 's/dpkg-reconfigure dracut/&||:/' /usr/local/lib/python*/dist-packages/mkosi/resources/dpkg-reconfigure-dracut.install
sudo rm -f /dev/kvm
echo /usr/local/bin >> $GITHUB_PATH