On Fri, 24 Jul 2015 09:30:46 +0200 =?ISO-8859
-2?Q?=22Jan_Bub=EDk_=28ACVy=B9kov=29=22?=
 <bu...@acvyskov.cz> wrote:
> Hi all, I had the same problem in Xenserver 5.6 environment with Jessie 
> in PV DomU.
> 
> I confirm that Dominique's patch helps with a minor modification. The 
> original patch creates paths that start like "//vmlinuz-3.16.0-4-amd64". 
> That is not compatible with Xenserver PVGRUB. I attach a corrected 
> patch. That creates paths like "/vmlinuz-3.16.0-4-amd64".
> 
> I also confirm, that with this patch applied, update-menu-lst generates 
> correct paths when /boot is on the root partition (eg. not-separated).

I have also just confirmed this, running pv-menu-lst in an arm guest on
Xen, which has a separate /boot by default from d-i.

Looking at the package git tree I see that support for creating relative
paths was actually deliberately removed. The best solution might be to
simply revert the commit below?

Ian.

commit 1a419be5828cf56ce02b88e8cb1470f8ac8df62e
Author: Charles Plessy <ple...@debian.org>
Date:   Sat Jan 25 22:51:53 2014 +0900

    Remove make_system_path_relative_to_its_root, only called on absolute paths 
here.

diff --git a/update-menu-lst b/update-menu-lst
index 5eb0319..d0793dc 100755
--- a/update-menu-lst
+++ b/update-menu-lst
@@ -28,53 +28,6 @@ set -e
 
 host_os=`uname -s | tr '[A-Z]' '[a-z]'`
 
-# This function was borrowed from grub2/util/update-grub_lib.in
-make_system_path_relative_to_its_root ()
-{
-  path=$1
-  # abort if file doesn't exist
-  if test -e $path ; then : ;else
-    return 1
-  fi
-
-  # canonicalize
-  if path=`readlink -f $path` ; then : ; else
-    return 1
-  fi
-
-  # if not a directory, climb up to the directory containing it
-  if test -d $path ; then
-    dir=$path
-  else
-    dir=`echo $path | sed -e "s,/[^/]*$,,g"`
-  fi
-
-  num=`stat -c %d $dir`
-
-  # this loop sets $dir to the root directory of the filesystem we're 
inspecting
-  while : ; do
-    parent=`readlink -f $dir/..`
-    if [ "x`stat -c %d $parent`" = "x$num" ] ; then : ; else
-      # $parent is another filesystem; we found it.
-      break
-    fi
-    if [ "x$dir" = "x/" ] ; then
-      # / is our root.
-      break
-    fi
-    dir=$parent
-  done
-
-  # This function never prints trailing slashes (so that its output can be
-  # appended a slash unconditionally).  Each slash in $dir is considered a
-  # preceding slash, and therefore the root directory is an empty string.
-  if [ "$dir" = "/" ] ; then
-    dir=""
-  fi
-
-  echo $path | sed -e "s,^$dir,,g"
-}
-
 # The grub installation directory
 grub_dir=/boot/grub
 
@@ -114,7 +67,7 @@ esac
 boot_device=$(find_device "/boot")
 
 # where grub looks for the kernels at boot time
-kernel_dir=`make_system_path_relative_to_its_root /boot`
+kernel_dir=/boot
 
 # the "-t abstraction" check is a workaround untill #484297 is fixed
 if abstraction=`grub-probe -t abstraction --device ${root_device} 2> 
/dev/null` && [ "$abstraction" = "" ] && \
@@ -583,7 +536,7 @@ echo >> $buffer
 
 echo -n "Searching for splash image ... " >&2
 current_splash=`grep '^splashimage=' ${menu_file} || true`
-grub_dir_rel=`make_system_path_relative_to_its_root $grub_dir`
+grub_dir_rel=$grub_dir
 
splashimage_path="splashimage=${grub_root_device}/${grub_dir_rel##${kernel_dir}}/splash.xpm.gz"
 if [ `sed -e "/^$start/,/^$end/d" $menu_file | grep -c '^splashimage='` != "0" 
] ; then
        #checks for splashscreen defined outside the autoupdated part


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to