commit: 8c241e87363c2550d0d8b629353e9167573ab29c Author: Peter Levine <plevine457 <AT> gmail <DOT> com> AuthorDate: Fri Oct 8 01:39:50 2021 +0000 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> CommitDate: Fri Oct 8 11:12:20 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c241e87
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 <AT> gmail.com> Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> .../os-prober-1.79-fix-busy-umount-message.patch | 21 +++++++++++++++++++++ sys-boot/os-prober/os-prober-9999.ebuild | 1 + 2 files changed, 22 insertions(+) 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 00000000000..a9859f5005a --- /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 59539158759..4c80110b806 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="