From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1X2O0J-00058S-R4 for mharc-grub-devel@gnu.org; Wed, 02 Jul 2014 13:07:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2O0C-00056p-1Y for grub-devel@gnu.org; Wed, 02 Jul 2014 13:07:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2O06-0004Kj-UQ for grub-devel@gnu.org; Wed, 02 Jul 2014 13:07:23 -0400 Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:35249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2O06-0004KX-Lu for grub-devel@gnu.org; Wed, 02 Jul 2014 13:07:18 -0400 Received: by mail-la0-f42.google.com with SMTP id pn19so7356973lab.29 for ; Wed, 02 Jul 2014 10:07:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=y+AybQML+MVYLrtZIl5ZtK87hKLjSkdQO1seXPS19hc=; b=zCkyISJZP/uaG6QIZ0Ip40e0bR/4aeCLHlUE5Lk/Z8nDTZzognKqbZMRK+28GYHo8A 03hU/dxeIEgu2au6Bl+gZwnXrzOWVRPorI70CkZI/g4PmvJu8QFCp4AY1auSsfLqUl9S o9LGEuFV4kCRZ4Hhu1RJmcOfDUqBffOfJNPnixrZJjCUPXNLx/rulD3h7C9WexRN+r+H uQUSde+HM41LsW4br5/9P9Dh/peEbUd/xD/lrMtwcjTTJeiEDVxcWi/lZ4lIlrpiIPto /PCVhbp6QI/cH+Xh7hcCvUBaDodqBbQQxRITSxtSeHr9gL2XfTYD1FAhFho9KSkU6gpx MtaQ== X-Received: by 10.112.139.167 with SMTP id qz7mr35832017lbb.22.1404320836810; Wed, 02 Jul 2014 10:07:16 -0700 (PDT) Received: from opensuse.site (ppp94-29-76-101.pppoe.spdop.ru. [94.29.76.101]) by mx.google.com with ESMTPSA id bd3sm32461370lbc.14.2014.07.02.10.07.15 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Jul 2014 10:07:16 -0700 (PDT) Date: Wed, 2 Jul 2014 21:07:14 +0400 From: Andrey Borzenkov To: The development of GNU GRUB Subject: Re: Odd problem with submenus Message-ID: <20140702210715.0cecc33b@opensuse.site> In-Reply-To: <53B2E8F7.2000405@oracle.com> References: <53B2E8F7.2000405@oracle.com> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22a Cc: john.haxby@oracle.com X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 17:07:29 -0000 В Tue, 01 Jul 2014 17:59:35 +0100 John Haxby пишет: > 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).