From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Bugs in parsing build options Date: Fri, 20 Feb 2015 23:47:57 +0300 Message-ID: <87bnkopawy.fsf_-_@gmail.com> References: <87fvcszuno.fsf@gnu.org> 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]:59294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOuUW-0005Pd-NV for guix-devel@gnu.org; Fri, 20 Feb 2015 15:48:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOuUV-00043a-SE for guix-devel@gnu.org; Fri, 20 Feb 2015 15:48:04 -0500 In-Reply-To: <87fvcszuno.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 06 Dec 2014 16:04:43 +0100") 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: guix-devel@gnu.org Ludovic Court=C3=A8s (2014-12-06 18:04 +0300) wrote: > Deck Pickard skribis: > >> From 9c27d995e1a622de8457209d40031b392538e0f8 Mon Sep 17 00:00:00 2001 >> From: nebuli >> Date: Fri, 5 Dec 2014 01:28:12 +0100 >> Subject: [PATCH] guix: scripts: Fix GUIX_BUILD_OPTIONS handling. >> >> Appending to "raw" args broke optional parameters in 'guix package -I' >> and 'guix package -A', and possibly other places. Therefore, switch to >> parsing each set of options on its own and append resulting alists >> together afterwards. >> >> * guix/scripts/archive.scm (parse-options-from): Rename from >> (parse-options) and add explicit argument. New form of (parse-options) >> using its old algorithm via -from function. >> * guix/scripts/build.scm: Ditto. >> * guix/scripts/environment.scm: Ditto. >> * guix/scripts/package.scm: Ditto. >> * guix/scripts/system.scm: Ditto. > > Good catch. I=E2=80=99ve applied it along with a test case that reproduc= es the > problem and a clarification in the doc. Hello, I think I found a problem with this commit. 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). So build commands will just ignore such options as "--no-grub" or "--no-substitutes" if a user didn't tweak GUIX_BUILD_OPTIONS. --=20 Alex