From 8dd96da584dc2f32000198e5cc46c8031a07f011 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Thu, 3 Aug 2023 06:05:59 +0300 Subject: [PATCH] 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 . 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 --- .github/workflows/mkosi-mainline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mkosi-mainline.yml b/.github/workflows/mkosi-mainline.yml index 31efc15b..f8e696bf 100644 --- a/.github/workflows/mkosi-mainline.yml +++ b/.github/workflows/mkosi-mainline.yml @@ -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