SHA256
1
0
forked from pool/os-prober
os-prober/os-prober-05efi-blkid.patch
Dirk Mueller 0ff7908001 Accepting request 580144 from home:michael-chang:branches:Base:System
- Use blkid to bailout udevinfo for db not imported in chroot
  environment (bsc#1076779)
  * os-prober-05efi-blkid.patch

OBS-URL: https://build.opensuse.org/request/show/580144
OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=81
2018-02-27 10:24:15 +00:00

19 lines
721 B
Diff

Index: os-prober/os-probes/mounted/x86/05efi
===================================================================
--- os-prober.orig/os-probes/mounted/x86/05efi
+++ os-prober/os-probes/mounted/x86/05efi
@@ -46,6 +46,13 @@ if type udevinfo > /dev/null 2>&1; then
fi
fi
+ # 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"