Hello community,

here is the log from the commit of package os-prober for openSUSE:Factory 
checked in at 2013-12-23 22:17:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/os-prober (Old)
 and      /work/SRC/openSUSE:Factory/.os-prober.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "os-prober"

Changes:
--------
--- /work/SRC/openSUSE:Factory/os-prober/os-prober.changes      2013-12-10 
17:44:20.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.os-prober.new/os-prober.changes 2013-12-23 
22:17:05.000000000 +0100
@@ -1,0 +2,9 @@
+Wed Dec 18 04:16:03 UTC 2013 - mch...@suse.com
+
+- add os-prober-fix-btrfs-subvol-mounted-tests.patch
+  * move btrfs subvolume mounted tests after regualr rootfs tree
+    tests to make sure that root and subvolume fs tree are tested.
+  * the test order is just a preference, assuming that distribution
+    are installed to root fs tree more likely than to a subvolume.
+
+-------------------------------------------------------------------

New:
----
  os-prober-fix-btrfs-subvol-mounted-tests.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ os-prober.spec ++++++
--- /var/tmp/diff_new_pack.HYFIfF/_old  2013-12-23 22:17:06.000000000 +0100
+++ /var/tmp/diff_new_pack.HYFIfF/_new  2013-12-23 22:17:06.000000000 +0100
@@ -49,6 +49,8 @@
 Patch11:        os-prober-accept-ESP-on-IMSM.patch
 # PATCH-FIX-OPENSUSE: don't modprobe all file system modules and don't test 
mount on unknown partition (bnc#851722)
 Patch12:        os-prober-dont-load-all-fs-module-and-dont-test-mount.patch
+# PATCH-FIX-OPENSUSE: fix os-prober entries for distro on btrfs root-fs not 
created (bnc#846003)
+Patch13:        os-prober-fix-btrfs-subvol-mounted-tests.patch
 
 Requires:       /bin/grep
 Requires:       /bin/sed
@@ -79,6 +81,7 @@
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 
 %build
 make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"

++++++ os-prober-fix-btrfs-subvol-mounted-tests.patch ++++++
Index: os-prober-1.61/os-probes/common/50mounted-tests
===================================================================
--- os-prober-1.61.orig/os-probes/common/50mounted-tests
+++ os-prober-1.61/os-probes/common/50mounted-tests
@@ -56,10 +56,54 @@ fi
 
 mounted=
 
-# all btrfs processing here.  Handle both unmounted and
-# mounted subvolumes.
 if [ "$types" = btrfs ]; then
        partition="$BTRFSDEV"
+fi
+
+if type grub2-mount >/dev/null 2>&1 && \
+   type grub2-probe >/dev/null 2>&1 && \
+   grub2-mount "$partition" "$tmpmnt" 2>/dev/null; then
+       mounted=1
+       type="$(grub2-probe -d "$partition" -t fs)" || true
+       if [ "$type" ]; then
+               debug "mounted using GRUB $type filesystem driver"
+       else
+               debug "mounted using GRUB, but unknown filesystem?"
+               type=fuseblk
+       fi
+else
+       ro_partition "$partition"
+       for type in $types; do
+               if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; 
then
+                       debug "mounted as $type filesystem"
+                       mounted=1
+                       break
+               fi
+       done
+fi
+
+if [ "$mounted" ]; then
+       for test in /usr/lib/os-probes/mounted/*; do
+               debug "running subtest $test"
+               if [ -f "$test" ] && [ -x "$test" ]; then
+                       if "$test" "$partition" "$tmpmnt" "$type"; then
+                               debug "os found by subtest $test"
+                               if ! umount "$tmpmnt"; then
+                                       warn "failed to umount $tmpmnt"
+                               fi
+                               rmdir "$tmpmnt" || true
+                               exit 0
+                       fi
+               fi
+       done
+       if ! umount "$tmpmnt"; then
+               warn "failed to umount $tmpmnt"
+       fi
+fi
+
+# all btrfs subvol processing here.  Handle both unmounted and
+# mounted subvolumes.
+if [ "$types" = btrfs ]; then
        debug "begin btrfs processing for $UUID"
        # note that the btrfs volume must not be mounted ro
        if mount -t btrfs -U "$UUID" "$tmpmnt"  2>/dev/null; then
@@ -117,52 +161,9 @@ if [ "$types" = btrfs ]; then
                        fi
                fi
        done
-       rmdir "$tmpmnt" || true
        if [ "$found" ]; then
+               rmdir "$tmpmnt" || true
                exit 0
-       else
-               exit 1
-       fi
-fi
-
-if type grub2-mount >/dev/null 2>&1 && \
-   type grub2-probe >/dev/null 2>&1 && \
-   grub2-mount "$partition" "$tmpmnt" 2>/dev/null; then
-       mounted=1
-       type="$(grub2-probe -d "$partition" -t fs)" || true
-       if [ "$type" ]; then
-               debug "mounted using GRUB $type filesystem driver"
-       else
-               debug "mounted using GRUB, but unknown filesystem?"
-               type=fuseblk
-       fi
-else
-       ro_partition "$partition"
-       for type in $types; do
-               if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; 
then
-                       debug "mounted as $type filesystem"
-                       mounted=1
-                       break
-               fi
-       done
-fi
-
-if [ "$mounted" ]; then
-       for test in /usr/lib/os-probes/mounted/*; do
-               debug "running subtest $test"
-               if [ -f "$test" ] && [ -x "$test" ]; then
-                       if "$test" "$partition" "$tmpmnt" "$type"; then
-                               debug "os found by subtest $test"
-                               if ! umount "$tmpmnt"; then
-                                       warn "failed to umount $tmpmnt"
-                               fi
-                               rmdir "$tmpmnt" || true
-                               exit 0
-                       fi
-               fi
-       done
-       if ! umount "$tmpmnt"; then
-               warn "failed to umount $tmpmnt"
        fi
 fi
 
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to