From a1ee78900e582f51d7c5fd86a98fcacfc75e7d9b Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Wed, 19 Jul 2023 14:18:05 -0700 Subject: [PATCH] main/postmarketos-mkinitfs: only run if deviceinfo exists (MR 4263) In some situations, like when building a device package with pmb, deviceinfo may not exist in the rootfs. mkinitfs 2.2's behavior changed slightly to fail if it can't find a deviceinfo, and this avoids calling it in those cases. [ci:skip-build]: Already built successfully in CI --- main/postmarketos-mkinitfs/APKBUILD | 2 +- main/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index 6cb68d26d..730e14606 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -2,7 +2,7 @@ # Co-Maintainer: Clayton Craft pkgname=postmarketos-mkinitfs pkgver=2.2 -pkgrel=0 +pkgrel=1 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://postmarketos.org" depends=" diff --git a/main/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger b/main/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger index 943901ed2..1c601891f 100644 --- a/main/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger +++ b/main/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger @@ -1,4 +1,5 @@ #!/bin/sh -e -/usr/sbin/mkinitfs +# only invoke mkinitfs if the deviceinfo exists in the rootfs +{ [ -f /etc/deviceinfo ] || [ -f /usr/share/deviceinfo/deviceinfo ]; } && /usr/sbin/mkinitfs exit 0