1 |
commit: 8c241e87363c2550d0d8b629353e9167573ab29c |
2 |
Author: Peter Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Oct 8 01:39:50 2021 +0000 |
4 |
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 8 11:12:20 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c241e87 |
7 |
|
8 |
sys-boot/os-prober: fix error message from umount delay |
9 |
|
10 |
Sometimes, umount may take time to complete. Fix corner-case of |
11 |
"umount: /var/lib/os-prober/mount: target is busy." |
12 |
|
13 |
Package-Manager: Portage-3.0.26, Repoman-3.0.3 |
14 |
Signed-off-by: Peter Levine <plevine457 <AT> gmail.com> |
15 |
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> |
16 |
|
17 |
.../os-prober-1.79-fix-busy-umount-message.patch | 21 +++++++++++++++++++++ |
18 |
sys-boot/os-prober/os-prober-9999.ebuild | 1 + |
19 |
2 files changed, 22 insertions(+) |
20 |
|
21 |
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 |
22 |
new file mode 100644 |
23 |
index 00000000000..a9859f5005a |
24 |
--- /dev/null |
25 |
+++ b/sys-boot/os-prober/files/os-prober-1.79-fix-busy-umount-message.patch |
26 |
@@ -0,0 +1,21 @@ |
27 |
+Fixes errors like "umount: /var/lib/os-prober/mount: target is busy." |
28 |
+which can appear in some corner-cases. |
29 |
+ |
30 |
+Bug: https://bugzilla.redhat.com/903906 |
31 |
+ |
32 |
+--- a/common.sh |
33 |
++++ b/common.sh |
34 |
+@@ -336,3 +336,13 @@ linux_mount_boot () { |
35 |
+ |
36 |
+ mountboot="$bootpart $mounted" |
37 |
+ } |
38 |
++ |
39 |
++umount_exec=$(which umount) |
40 |
++umount() { |
41 |
++ if ! $umount_exec $@ 2> /dev/null; then |
42 |
++ error "umount error, retrying after 1 sec" |
43 |
++ sleep 1 |
44 |
++ $umount_exec $@ |
45 |
++ fi |
46 |
++} |
47 |
++ |
48 |
|
49 |
diff --git a/sys-boot/os-prober/os-prober-9999.ebuild b/sys-boot/os-prober/os-prober-9999.ebuild |
50 |
index 59539158759..4c80110b806 100644 |
51 |
--- a/sys-boot/os-prober/os-prober-9999.ebuild |
52 |
+++ b/sys-boot/os-prober/os-prober-9999.ebuild |
53 |
@@ -30,6 +30,7 @@ PATCHES=( |
54 |
"${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch |
55 |
"${FILESDIR}"/${PN}-1.79-use-fstab-name.patch |
56 |
"${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch |
57 |
+ "${FILESDIR}"/${PN}-1.79-fix-busy-umount-message.patch |
58 |
) |
59 |
|
60 |
DOC_CONTENTS=" |