refresh: Refactor option handling and '--recursive'.
authorLudovic Courtès <ludo@gnu.org>
Fri, 11 Jan 2019 10:44:26 +0000 (11:44 +0100)
committerLudovic Courtès <ludo@gnu.org>
Fri, 11 Jan 2019 11:14:38 +0000 (12:14 +0100)
commitfca43e14f70c0536668981eb1aed9e46a42de935
tree52be03acca408a1667ea89c4f557404c0a06674f
parent88d710179808d96761f10d81913ee5aac8458fb3
refresh: Refactor option handling and '--recursive'.

This allows us to combine '--recursive' with other options (-u, -m,
etc.), turns off warnings when '--recursive' is used, and avoids the
hazards of I/O in the presence of multithreading.

* guix/scripts/refresh.scm (options->packages): New procedure, with code
formerly in 'guix-refresh'.
(refresh-recursive): Remove.
(guix-refresh)[keep-newest, core-package?, args-packages, packages]:
Remove.
[warn?]: Set to #f when RECURSIVE? is true.
Call 'options->packages' in monadic context.
guix/scripts/refresh.scm