From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Bugs in parsing build options Date: Tue, 24 Feb 2015 23:45:27 +0100 Message-ID: <87oaoj7wu0.fsf@gnu.org> References: <87fvcszuno.fsf@gnu.org> <87bnkopawy.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQOEX-0003IS-0j for guix-devel@gnu.org; Tue, 24 Feb 2015 17:45:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQOER-0000ET-Se for guix-devel@gnu.org; Tue, 24 Feb 2015 17:45:40 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQOER-0000EN-ET for guix-devel@gnu.org; Tue, 24 Feb 2015 17:45:35 -0500 In-Reply-To: <87bnkopawy.fsf_-_@gmail.com> (Alex Kost's message of "Fri, 20 Feb 2015 23:47:57 +0300") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > I noticed that "--no-grub" option has no effect. For example, > "guix system --no-grub reconfigure" installs GRUB anyway. > > Further investigation showed that there is a problem in parsing build > options. After that commit (847391f) we have the following code: > > (append (parse-options-from args) > (parse-options-from (environment-build-options))) > > in several places. But 'parse-options-from' returns default values for > unspecified options, e.g. if you didn't set GUIX_BUILD_OPTIONS, then > (parse-options-from '()) will return an alist of default options > (including =E2=80=98(install-grub? . #t)=E2=80=99). Indeed, good catch. Commit 6e1a7d1 fixes it. > So build commands will just ignore such options as "--no-grub" or > "--no-substitutes" if a user didn't tweak GUIX_BUILD_OPTIONS. The problem was in fact specific to the option handler for --no-grub; the one for --no-substitutes (and all the others I checked) always conses, so there=E2=80=99s no problem. Thanks, Ludo=E2=80=99.