From e048839588e34265fd810f0b0150cd582c8dbf3f Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 8 Sep 2021 23:30:38 +0200 Subject: [PATCH] main/postmarketos-mkinitfs: don't rm vmlinuz-* (MR 2501) Adjust post-upgrade script to not remove vmlinuz-*. This causes problems with devices using kernels from Alpine, where the kernel is not installed to /boot/vmlinuz, as it is now the case in postmarketOS, but e.g. in /boot/vmlinuz-rpi. The intention was to clean up files when migrating from the old postmarketos-mkinitfs to the new one (>= 1.0.0). However, the /boot/vmlinuz* files are managed by apk, so they should already get removed. Add -v, so it prints a message when removing a file from /boot. --- main/postmarketos-mkinitfs/APKBUILD | 2 +- main/postmarketos-mkinitfs/postmarketos-mkinitfs.post-upgrade | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index 8d562aad5..b2892efe0 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -2,7 +2,7 @@ # Co-Maintainer: Clayton Craft pkgname=postmarketos-mkinitfs pkgver=1.0.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.post-upgrade b/main/postmarketos-mkinitfs/postmarketos-mkinitfs.post-upgrade index 926747374..53a62ac95 100644 --- a/main/postmarketos-mkinitfs/postmarketos-mkinitfs.post-upgrade +++ b/main/postmarketos-mkinitfs/postmarketos-mkinitfs.post-upgrade @@ -5,8 +5,8 @@ # full than it needs to be, and things like copying files atomically in the new # mkinitfs may not have enough space to do the atomic copy echo "Cleaning up old boot files..." -for f in /boot/boot.img-* /boot/vmlinuz-* /boot/initramfs-*-extra* /boot/initramfs-*[!-extra]; do - [ -f "$f" ] && rm "$f" +for f in /boot/boot.img-* /boot/initramfs-*-extra* /boot/initramfs-*[!-extra]; do + [ -f "$f" ] && rm -v "$f" done exit 0