[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bugs in parsing build options
From: |
Alex Kost |
Subject: |
Bugs in parsing build options |
Date: |
Fri, 20 Feb 2015 23:47:57 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Ludovic Courtès (2014-12-06 18:04 +0300) wrote:
> Deck Pickard <address@hidden> skribis:
>
>> From 9c27d995e1a622de8457209d40031b392538e0f8 Mon Sep 17 00:00:00 2001
>> From: nebuli <address@hidden>
>> 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’ve applied it along with a test case that reproduces 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 ‘(install-grub? . #t)’).
So build commands will just ignore such options as "--no-grub" or
"--no-substitutes" if a user didn't tweak GUIX_BUILD_OPTIONS.
--
Alex
- Bugs in parsing build options,
Alex Kost <=