Juha Aatrokoski
2012-Jul-06 08:33 UTC
[Pkg-xen-devel] Bug#680479: xen-utils-4.0: pygrub does not support grub2 submenus
Package: xen-utils-4.0 Version: 4.0.1-5.2 Severity: important Tags: upstream patch pygrub in Debian Squueze does not support Grub2 submenus. At least Ubuntu Precise uses a submenu for older kernel versions, so a Precise domU with more than one kernel installed will be unbootable (without manual fixes) on a Squeeze dom0. Attached is a patch that adds submenu support to pygrub. -- System Information: Debian Release: 6.0.5 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages xen-utils-4.0 depends on: ii e2fslibs 1.41.12-4stable1 ext2/ext3/ext4 file system librari ii iproute 20100519-3 networking and traffic control too ii libc6 2.11.3-3 Embedded GNU C Library: Shared lib ii libncurses5 5.7+20100313-5 shared libraries for terminal hand ii libxenstore3.0 4.0.1-5.2 Xenstore communications library fo ii python-support 1.0.10 automated rebuilding support for P ii python2.5 2.5.5-11 An interactive high-level object-o ii udev 164-3 /dev/ and hotplug management daemo ii xen-utils-common 4.0.0-1 XEN administrative tools - common ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime Versions of packages xen-utils-4.0 recommends: ii bridge-utils 1.4-5 Utilities for configuring the Linu ii xen-hypervisor-4.0-amd64 [xen 4.0.1-5.2 The Xen Hypervisor on AMD64 Versions of packages xen-utils-4.0 suggests: pn xen-docs-4.0 <none> (no description available) -- no debconf information -------------- next part -------------- --- xen-4.0.1/tools/pygrub/src/GrubConf.py 2012-06-21 09:41:05.000000000 +0300 +++ xen-4.0.1/tools/pygrub/src/GrubConf.py 2012-07-06 10:55:37.000000000 +0300 @@ -368,6 +368,7 @@ in_function = False img = None title = "" + submenu = 0 for l in lines: l = l.strip() # skip blank lines @@ -386,6 +387,12 @@ in_function = False continue + # new submenu + title_match = re.match('^submenu ["\'](.*)["\'] (.*){', l) + if title_match: + submenu += 1 + continue + # new image title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l) if title_match: @@ -397,6 +404,9 @@ if l.startswith("}"): if img is None: + if submenu: + submenu -= 1 + continue raise RuntimeError, "syntax error: closing brace without menuentry" self.add_image(Grub2Image(title, img))
Ian Campbell
2012-Jul-06 09:17 UTC
[Pkg-xen-devel] Bug#680479: Bug#680479: xen-utils-4.0: pygrub does not support grub2 submenus
On Fri, 2012-07-06 at 11:33 +0300, Juha Aatrokoski wrote:> Package: xen-utils-4.0 > Version: 4.0.1-5.2 > Severity: important > Tags: upstream patch > > > pygrub in Debian Squueze does not support Grub2 submenus. At least > Ubuntu Precise uses a submenu for older kernel versions, so a Precise > domU with more than one kernel installed will be unbootable (without > manual fixes) on a Squeeze dom0. > > Attached is a patch that adds submenu support to pygrub.Thanks, 24001:152049468175 "pygrub: cope with configurations with submenus" from upstream might be a better bet though since it would reduce deviation between Debian and upstream. -- Ian Campbell Current Noise: Plague Ridden - Meathook Suspension This sentence no verb.