From bfa705b7451306c829d9494b09515c4a83ad27b4 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 22 Jul 2020 09:12:29 +0200 Subject: [PATCH] main/postmarketos-mkinitfs: fix device sed regex (MR 1436) The p? is not redundant. Without it, the p in mmcblk0p2 for example does not get cut off, meaning the resulting device is not "mmcblk0" but "mmcblk0p". My bad, sorry for the breakage. Fixes: 9f6600ba ("main/postmarketos-mkinitfs: rm pmOS_deleteme") Fixes: 9d86f6fe ("main/postmarketos-mkinitfs: resize: unallocated space check, even if forced") --- main/postmarketos-mkinitfs/APKBUILD | 4 ++-- main/postmarketos-mkinitfs/init_functions.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index e4a5a4112..0411bf58e 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -1,6 +1,6 @@ pkgname=postmarketos-mkinitfs pkgver=0.14.0 -pkgrel=0 +pkgrel=1 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://postmarketos.org" # multipath-tools: kpartx @@ -40,7 +40,7 @@ check() { sha512sums="5037cb7285bb7c0c40ca9e6df332d882ef9a8b379756c785f921e062dab1b7e7f3139d00897f69323a916d709ced4297fea8cbd3a13ebae575b873ec9e2cbfae 00-default.modules 7fc6ba96419628850984df3322b73bcf655cba03fe3e97ec7425e66e90f4b2a4de106b5cb2e3d46785a92557334288011334104285e2050c7a8e823b8fa5668c init.sh.in -8237cfa4c7aabd6a71fcf2541a9d3f74269b5c00f3c0519c97b801da8b280527a0a8c3e1eff2a67b46859ee604a3e4519329cbfb58defe9739df249eb8646c1e init_functions.sh +e9bbf6850c0c44f10c8fe66ceb05ed454844646dd937b5fe614810a0cce7c7383febe5ee1b0830217bff71a29621d82aa57adbcd59cb24a72701504887513ff1 init_functions.sh 7201d4640a3e9ead8a47ffd9916b068476b7d950760a84c37e02268c942d49896bc986da6bdee27e832639c90775354d68046a6475205d8d1da995b068120d8f mkinitfs.sh d593b921bd6c0204af874266060667d78a232c0131ce7f0ad4124f9b240fcbb6ac2a8a2b8ee30d27d78bed8c1a506c4e6cb13b57c33cee3a00a7d96eca45a7f3 mkinitfs_functions.sh c7a3c33daeb12b33ac72207191941c4d634f15c22958273b52af381a70ebaba1d3a9299483f0c447d9e66c560151fe7b9588bb4bbef2c8914f83185984ee4622 mkinitfs_test.sh" diff --git a/main/postmarketos-mkinitfs/init_functions.sh b/main/postmarketos-mkinitfs/init_functions.sh index 4ba0ba963..4117fee9a 100644 --- a/main/postmarketos-mkinitfs/init_functions.sh +++ b/main/postmarketos-mkinitfs/init_functions.sh @@ -220,7 +220,7 @@ delete_old_install_partition() { return fi - device="$(echo "$partition" | sed -E 's/3$//')" + device="$(echo "$partition" | sed -E 's/p?3$//')" echo "First boot after running on-device installer - deleting old" \ "install partition: $partition" parted -s "$device" rm 3 @@ -264,7 +264,7 @@ resize_root_partition() { # PinePhone). For them, it is fine to use the whole storage device and # so we pass PMOS_FORCE_PARTITION_RESIZE as kernel parameter. if grep -q PMOS_FORCE_PARTITION_RESIZE /proc/cmdline; then - partition_dev="$(echo "$partition" | sed -E 's/2$//')" + partition_dev="$(echo "$partition" | sed -E 's/p?2$//')" if has_unallocated_space "$partition_dev"; then echo "Resize root partition ($partition)" parted -s "$partition_dev" resizepart 2 100%