File fix-grub2-entry-paths.diff of Package koan

Index: koan-2.9.0/koan/app.py
===================================================================
--- koan-2.9.0.orig/koan/app.py
+++ koan-2.9.0/koan/app.py
@@ -1294,13 +1294,18 @@ class Koan:
 
                 # Create grub2 menuentry
                 grub_entry = """
-                cat <<EOF
-                menuentry "%s" {
-                    linux %s %s
-                    initrd %s
-                }
-                EOF
-                """ % (name, kernel_local, k_args, initrd_local)
+. "$pkgdatadir/grub-mkconfig_lib"
+
+rel_kernel=`make_system_path_relative_to_its_root {kernel}`
+rel_initrd=`make_system_path_relative_to_its_root {initrd}`
+
+cat <<EOF
+menuentry "{name}" {{
+    linux $rel_kernel {args}
+    initrd $rel_initrd
+}}
+EOF
+                """.format(name=name, kernel=kernel_local, args=k_args, initrd=initrd_local)
 
                 # Save grub2 menuentry
                 fd = open(grub_file, "w")
openSUSE Build Service is sponsored by