summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2021-10-07 21:39:50 -0400
committerBen Kohler <bkohler@gentoo.org>2021-10-08 06:12:20 -0500
commit8c241e87363c2550d0d8b629353e9167573ab29c (patch)
treef5465037d1a7bf7f8e272c837b42a34307d9db13 /sys-boot
parentsys-boot/os-prober: return boot instead of root if both are mounted (diff)
downloadgentoo-8c241e87363c2550d0d8b629353e9167573ab29c.tar.gz
gentoo-8c241e87363c2550d0d8b629353e9167573ab29c.tar.bz2
gentoo-8c241e87363c2550d0d8b629353e9167573ab29c.zip
sys-boot/os-prober: fix error message from umount delay
Sometimes, umount may take time to complete. Fix corner-case of "umount: /var/lib/os-prober/mount: target is busy." Package-Manager: Portage-3.0.26, Repoman-3.0.3 Signed-off-by: Peter Levine <plevine457@gmail.com> Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch21
-rw-r--r--sys-boot/os-prober/os-prober-9999.ebuild1
2 files changed, 22 insertions, 0 deletions
diff --git a/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch b/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch
new file mode 100644
index 000000000000..a9859f5005ab
--- /dev/null
+++ b/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch
@@ -0,0 +1,21 @@
+Fixes errors like "umount: /var/lib/os-prober/mount: target is busy."
+which can appear in some corner-cases.
+
+Bug: https://bugzilla.redhat.com/903906
+
+--- a/common.sh
++++ b/common.sh
+@@ -336,3 +336,13 @@ linux_mount_boot () {
+
+ mountboot="$bootpart $mounted"
+ }
++
++umount_exec=$(which umount)
++umount() {
++ if ! $umount_exec $@ 2> /dev/null; then
++ error "umount error, retrying after 1 sec"
++ sleep 1
++ $umount_exec $@
++ fi
++}
++
diff --git a/sys-boot/os-prober/os-prober-9999.ebuild b/sys-boot/os-prober/os-prober-9999.ebuild
index 59539158759d..4c80110b8060 100644
--- a/sys-boot/os-prober/os-prober-9999.ebuild
+++ b/sys-boot/os-prober/os-prober-9999.ebuild
@@ -30,6 +30,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch
"${FILESDIR}"/${PN}-1.79-use-fstab-name.patch
"${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch
+ "${FILESDIR}"/${PN}-1.79-fix-busy-umount-message.patch
)
DOC_CONTENTS="