Fix detection of Fedora and other distros that moved /lib into /usr and left behind...
authorJoey Hess <joey@kitenet.net>
Mon, 26 Nov 2012 16:19:16 +0000 (12:19 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 26 Nov 2012 16:19:16 +0000 (12:19 -0400)
debian/changelog
os-probes/mounted/common/90linux-distro

index 1e635b4..a3225e3 100644 (file)
@@ -1,9 +1,15 @@
 os-prober (1.57) UNRELEASED; urgency=low
 
+  [ Christian Perrier ]
   * Deal with grub-probe exiting with non zero status on some
     devices, which in turns can stuck update-grub
     Closes: #680084
 
+  [ Joey Hess ]
+  * Fix detection of Fedora and other distros that moved /lib into /usr
+    and left behind a symlink. Grub's filesystem code does not support
+    symlinks. Closes: #685159 Thanks Andreas Bombe for the patch.
+
  -- Christian Perrier <bubulle@debian.org>  Sat, 03 Nov 2012 17:48:32 +0100
 
 os-prober (1.56) unstable; urgency=low
index f237a38..6678f22 100755 (executable)
@@ -12,8 +12,12 @@ type="$3"
 # fact that only some architectures have ld-linux.so, I can't see anything
 # better. Make sure this test has a high number so that more accurate tests
 # can come first.
+# Unless volumes to checked are already mounted, they will be mounted using
+# GRUB's own filesystems through FUSE. Since these ATM doesn't support
+# symlinks we need to also check in $dir/usr/lib* for distributions that
+# moved /lib* to /usr and only left symlinks behind.
 # TODO: look for ld-linux.so on arches that have it
-if ls "$dir"/lib*/ld*.so* >/dev/null 2>/dev/null; then
+if (ls "$dir"/lib*/ld*.so* || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then
        if [ -e "$dir/etc/debian_version" ]; then
                short="Debian"
                long="$(printf "Debian GNU/Linux (%s)\n" "$(cat "$dir/etc/debian_version")")"