guix-devel/guix/scripts
Ludovic Courtès 5c3d44303e
guix gc: Correctly handle '--delete-generations' with no arguments.
Previously, 'guix gc --delete-generations' would crash: the "" pattern
would be passed to 'matching-generations', which would return #f instead
of returning a list.

Reported by Raghav Gururajan <rvgn@disroot.org>
in <https://bugs.gnu.org/36466>.

* guix/ui.scm (matching-generations): Raise an error when passed an
invalid pattern.
* guix/scripts/gc.scm (delete-old-generations): Check if PATTERN is
true.
(%options): Leave ARG as-is for 'delete-generations'.
(guix-gc): Use 'assq' instead of 'assoc-ref' for 'delete-generations'.
* guix/scripts/package.scm (delete-matching-generations):
Replace (string-null? pattern) with (not pattern).  Remove 'else'
clause.
(%options): Leave ARG as-is for 'delete-generations'.
* guix/scripts/pull.scm (%options): Leave ARG as-is for
'list-generations'.
(process-query): Replace (string-null? pattern) with (not pattern).
* guix/scripts/system.scm (list-generations): Likewise, and remove
'else' clause.
(process-command): Use #f instead of "" when no pattern is given.
2019-07-11 23:13:26 +02:00
..
container
import
system
archive.scm
authenticate.scm
build.scm
challenge.scm
container.scm
copy.scm
deploy.scm
describe.scm
download.scm
edit.scm
environment.scm
gc.scm
graph.scm
hash.scm
import.scm
install.scm
lint.scm
offload.scm
pack.scm
package.scm
perform-download.scm
processes.scm
publish.scm
pull.scm
refresh.scm
remove.scm
repl.scm
search.scm
size.scm
substitute.scm
system.scm
upgrade.scm
weather.scm