All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: john.haxby@oracle.com
Subject: Re: Odd problem with submenus
Date: Wed, 2 Jul 2014 21:07:14 +0400	[thread overview]
Message-ID: <20140702210715.0cecc33b@opensuse.site> (raw)
In-Reply-To: <53B2E8F7.2000405@oracle.com>

В Tue, 01 Jul 2014 17:59:35 +0100
John Haxby <john.haxby@oracle.com> пишет:

> Hello,
> 
> I have a warning generated by grub2-mkconfig that shows up on various
> systems that I'm not sure what to do about.  Well, I know I can ignore
> it, but I'm not sure what do do about not getting the warning in the
> first place.
> 
> On this machine here, I have
> 
> menuentry 'Fedora, with Linux 3.14.9-200.fc20.x86_64' --class ...
> 
> and grub2-set-default 'Fedora, with ...' is OK, but then
> 
> and I also have GRUB_DISABLE_SUBMENU=true i /etc/default/grub, so
> 
> $ grub2-mkconfig -o /boot/grub2/grub.cfg
> ...
> Warning: Please don't use old title `Fedora, with Linux
> 3.14.9-200.fc20.x86_64' for GRUB_DEFAULT, use `Advanced options for
> Fedora>Fedora, with Linux 3.14.9-200.fc20.x86_64' (for versions before
> 2.00) or
> `gnulinux-advanced-d87b5f54-5bfb-45bd-b300-f4b1db6d5dfb>gnulinux-3.14.9-200.fc20.x86_64-advanced-d87b5f54-5bfb-45bd-b300-f4b1db6d5dfb'
> (for 2.00 or later)
> 
> Exhorting me to use a submenu default when there are no submenus is
> clearly wrong, so in /etc/grub.d/10_linux (and the other
> platform-specific files) there's:
> 
> >       if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
> >           replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
> >           quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
> >           title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
> >           grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
> >       fi
> 
> It's easy enough to add a test for GRUB_DISABLE_SUBMENU here but I'm at
> a loss to know why this clause is needed at all.  I know it means that
> if I have submenus enabled then I can just set the default to be the
> title of a submenu and not worry about the "Advanced options ..." bit,
> but it looks to me as though it was just a transition thing which is
> really no longer needed.
> 

You never know it; there is no reason to break working configuration.

> Is this really no longer needed or am I missing something?  I'm happy to
> submit a patch either way.
> 


Yes, please, make it conditionally add submenu title to
replacement_title based on GRUB_DISABLE_SUBMENU. Please also fix all
scripts (the bug is not limited to linux).


  reply	other threads:[~2014-07-02 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 16:59 Odd problem with submenus John Haxby
2014-07-02 17:07 ` Andrey Borzenkov [this message]
2014-07-03 14:38   ` John Haxby
2014-07-03 16:47     ` Andrey Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140702210715.0cecc33b@opensuse.site \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=john.haxby@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.