[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45018] [PATCH 2/6] daemon: Use 'Agent' to spawn 'guix substitute --
From: |
Ludovic Courtès |
Subject: |
[bug#45018] [PATCH 2/6] daemon: Use 'Agent' to spawn 'guix substitute --query'. |
Date: |
Sun, 06 Dec 2020 22:51:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Mathieu Othacehe <othacehe@gnu.org> skribis:
>> + (("--substitute" store-path destination)
>> + ;; Download STORE-PATH and add store it as a Nar in file
>> DESTINATION.
>
> add it to store?
Oops.
>> + const Strings args = { "substitute", "--query" };
>> + const std::map<string, string> env = { { "_NIX_OPTIONS",
>> settings.pack() } };
>> + std::unique_ptr<Agent>fresh(new Agent(settings.guixProgram, args, env));
>
> You should prefer make_unique to "new" calls.
Apparently ‘make_unique’ is a C++14 thing and we don’t build against
that standard (yet), so I left it as is. The next patch removes this
use of ‘unique_ptr’ anyway.
[bug#45018] [PATCH 0/6] Process and connection reuse for substitutions, 宋文武, 2020/12/03
[bug#45018] [PATCH 0/6] Process and connection reuse for substitutions, Ludovic Courtès, 2020/12/03