From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KLtY7-0004OH-6W for mharc-grub-devel@gnu.org; Thu, 24 Jul 2008 01:39:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLtY4-0004Nr-Se for grub-devel@gnu.org; Thu, 24 Jul 2008 01:39:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLtY3-0004Nf-C4 for grub-devel@gnu.org; Thu, 24 Jul 2008 01:39:32 -0400 Received: from [199.232.76.173] (port=55217 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLtY3-0004Nc-38 for grub-devel@gnu.org; Thu, 24 Jul 2008 01:39:31 -0400 Received: from mailout06.t-online.de ([194.25.134.19]:38240) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLtY3-0003VN-04 for grub-devel@gnu.org; Thu, 24 Jul 2008 01:39:31 -0400 Received: from fwd28.aul.t-online.de by mailout06.sul.t-online.de with smtp id 1KLtY1-0004J7-02; Thu, 24 Jul 2008 07:39:29 +0200 Received: from [10.3.2.2] (Z1VFCoZQoh7DzVLtwOD57T2nFX4gxV4SjZ1DhXgw+SARQQqTb73lVnFQz3FQGAQQHI@[217.235.206.20]) by fwd28.aul.t-online.de with esmtp id 1KLtXw-2Ki7kW0; Thu, 24 Jul 2008 07:39:24 +0200 Message-ID: <4888158C.1070506@t-online.de> Date: Thu, 24 Jul 2008 07:39:24 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="------------030900080405030304010103" X-ID: Z1VFCoZQoh7DzVLtwOD57T2nFX4gxV4SjZ1DhXgw+SARQQqTb73lVnFQz3FQGAQQHI X-TOI-MSGID: 3ab2ac43-9198-4916-8d30-6b24dcd1666f X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: [PATCH] Abort grub-install if prefix cannot be determined X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2008 05:39:33 -0000 This is a multi-part message in MIME format. --------------030900080405030304010103 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit grub-install does not check error return from make_system_path_relative_to_its_root() fails. BTW: Unlike the other scripts, grub-install does not 'set -e'. Is this intentional or historic ?-) Christian 2008-07-24 Christian Franke * util/i386/pc/grub-install.in: If `--debug' is specified, pass `--verbose' to grub-setup. Abort script if make_system_path_relative_to_its_root() fails. --------------030900080405030304010103 Content-Type: text/x-diff; name="grub-install-prefix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="grub-install-prefix.patch" diff --git a/util/i386/pc/grub-install.in b/util/i386/pc/grub-install.in index 1b2bccb..d7966d5 100644 --- a/util/i386/pc/grub-install.in +++ b/util/i386/pc/grub-install.in @@ -127,8 +127,10 @@ if test "x$install_device" = x; then fi # If the debugging feature is enabled, print commands. +setup_verbose= if test $debug = yes; then set -x + setup_verbose="--verbose" fi # Initialize these directories here, since ROOTDIR was initialized. @@ -240,12 +242,12 @@ fi # The order in this list is critical. Be careful when modifying it. modules="$modules $fs_module $partmap_module biosdisk $devabstraction_module" -$grub_mkimage --output=${grubdir}/core.img \ - --prefix=${prefix_drive}`make_system_path_relative_to_its_root ${grubdir}`/ \ - $modules || exit 1 +grub_prefix="${prefix_drive}`make_system_path_relative_to_its_root ${grubdir}`" || exit 1 + +$grub_mkimage --output=${grubdir}/core.img --prefix=${grub_prefix}/ $modules || exit 1 # Now perform the installation. -$grub_setup --directory=${grubdir} --device-map=${device_map} \ +$grub_setup ${setup_verbose} --directory=${grubdir} --device-map=${device_map} \ ${install_device} || exit 1 # Prompt the user to check if the device map is correct. --------------030900080405030304010103--