diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-10-08 23:06:07 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-10-08 23:06:07 +0100 |
commit | e23a08d0c97a0cc415aaa165da840b056f93c997 (patch) | |
tree | 4c5f7db60483518201fef36f8cc0712789a08db2 /sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch | |
parent | 391b5b359a346aff490103da7dddc85047f83830 (diff) |
gentoo resync : 08.10.2021
Diffstat (limited to 'sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch')
-rw-r--r-- | sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch b/sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch new file mode 100644 index 000000000000..b5b90b2214da --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-efi-chroot-blkid-fallback.patch @@ -0,0 +1,24 @@ +Fixes missing entries when os-prober is run in a chroot environment by falling back +to blkid if udev isn't available or if /run/udev isn't bind mounted. Modified from +https://build.opensuse.org/package/view_file/Base:System/os-prober/os-prober-05efi-blkid.patch?rev=103 + +Bug: https://bugs.gentoo.org/761475 + https://bugzilla.opensuse.org/1076779 + +--- a/os-probes/mounted/x86/05efi ++++ b/os-probes/mounted/x86/05efi +@@ -46,6 +46,14 @@ if type udevinfo > /dev/null 2>&1; then + fi + + eval "$(udevinfo -q property -n "$partition" | grep -E '^ID_PART_ENTRY_(TYPE|SCHEME)=')" ++ ++ # udev may not work in chroot as its db may not be there, bailout that by blkid (bsc#1076779) ++ if [ -z "$ID_PART_ENTRY_TYPE" -a -z "$ID_PART_ENTRY_SCHEME" ] && ++ type blkid > /dev/null 2>&1; then ++ debug "fallback to blkid" ++ eval "$(blkid -p -o udev "$partition" | grep -E '^(ID_PART_ENTRY_(TYPE|SCHEME))=')" ++ fi ++ + debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME" + debug "$partition partition type is $ID_PART_ENTRY_TYPE" + |