From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: [PATCH] Explicitly pass grub to install, install-grub*, install-grub, initialize-hard-disk and qemu-image. Date: Fri, 11 Nov 2016 16:12:51 +0100 Message-ID: <20161111161251.1a609333@scratchpost.org> References: <20161110090927.13187-1-dannym@scratchpost.org> <871syjbcku.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87wpgbqn1n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c5DVm-0006sv-0o for guix-devel@gnu.org; Fri, 11 Nov 2016 10:13:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c5DVi-0003kV-Hw for guix-devel@gnu.org; Fri, 11 Nov 2016 10:13:01 -0500 In-Reply-To: <87wpgbqn1n.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org Hi Ludo, > I prefer that setting PATH to point to the right GRUB, rather than > having to carry the directory name of GRUB in 10 different places. I much prefer not having a magical non-Guile variable influence which bootloader (!) is installed. Of all things this is the most sensitive part of the installation process - if the bootloader doesn't work you can't even emergency-boot - and it depends on PATH being set correctly at some remote place. I think it's much better not to have spooky action at a distance. > This is the approach taken in several places, such as (gnu system vm): > we set PATH, and then we can happily call functions that in turn expect > commands in $PATH. > > Danny, what led you to this patch? :-) When I read the source I couldn't find which grub-install executable it invokes (and how that even works) and neither could anyone on the list for months (I asked). I think for maintenance it's much better not to use PATH but rather be explicit about which package it is. This is part of the u-boot and grub-efi effort. Of course it's optional to do it - grub, u-boot and grub-efi can work with PATH as well. But should they? However if we aren't explicit about it then the next person will have to search around just like I did. Also it would keep being a Damocles' sword over our heads - if someone modifies PATH (in the Guix source code, by accident) it will just pick up a random grub (maybe Debian's if it's installed on a foreign distro - who knows?).