From: Ian Campbell Subject: Re: [PATCH] pygrub/GrubConf: fix boot problem for fedora 19 grub.cfg (2nd attempt) Date: Wed, 26 Jun 2013 14:50:46 +0100 Message-ID: <1372254646.7337.85.camel@zakaz.uk.xensource.com> References: <20130624162132.GA16610@joshua.mesa.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130624162132.GA16610@joshua.mesa.nl> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Marcel J.E. Mol" Cc: George Dunlap , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2013-06-24 at 18:21 +0200, Marcel J.E. Mol wrote: > Booting a fedora 19 domU failed because a it could not properly > parse the grub.cfg file. This was cased by > > set default="${next_entry}" > Any chance you could send us an example of the actual problematic configuration file, ideally as a patch adding a new file to tools/pygrub/examples/. That "test suite" is rather rudimentary (to the extent I'm a bit embarrassed to call it a suite...) but collecting them when a bug is fixed is a good way to grow it. > This statement actually is within an 'if' statement, so maybe it would > be better to skip code within if/fi blocks... > But this patch seems to work fine. > > Signed-off-by: Marcel Mol This change looks good to me: Acked-by: Ian Campbell George, WRT 4.3 what do you think? I think the change is low risk for any grub.conf without "${next_entry}" in it and a clear improvement to any which does. > --- > tools/pygrub/src/GrubConf.py | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py > index 629951f..6324c62 100644 > --- a/tools/pygrub/src/GrubConf.py > +++ b/tools/pygrub/src/GrubConf.py > @@ -427,6 +427,8 @@ class Grub2ConfigFile(_GrubConfigFile): > if self.commands[com] is not None: > if arg.strip() == "${saved_entry}": > arg = "0" > + elif arg.strip() == "${next_entry}": > + arg = "0" > setattr(self, self.commands[com], arg.strip()) > else: > logging.info("Ignored directive %s" %(com,)) > -- > 1.7.7.6 >