From 6447738c013cf205959ca4afd1a97248fb9ccf58 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 13 Dec 2013 15:37:57 -0500 Subject: guix package: allow multiple arguments after -i, -r, and -u. * guix/scripts/package.scm (%options): Adapt option processors to accept and return a second seed value: 'arg-handler', which handles bare arguments (if not false). The install, remove, and upgrade option processors return an arg-handler that repeat the same operation. All other option processors return #f as the arg-handler. Make the arguments to install and remove optional. The upgrade option processor deletes (upgrade . #f) from the alist before adding a new entry. (guix-package): Procedures passed to 'args-fold*' accept the new seed value 'arg-handler'. The 'operand-proc' uses 'arg-handler' (if not false). * doc/guix.texi (Invoking guix package): Update docs. * tests/guix-package.sh: Add test. --- tests/guix-package.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 9116f352c9..47a2d06cb3 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -155,6 +155,9 @@ then guix package -p "$profile" --delete-generations=0 fi +# Make sure multiple arguments to -i works. +guix package --bootstrap -i guile gcc -p "$profile" -n + # Make sure the `:' syntax works. guix package --bootstrap -i "binutils:lib" -p "$profile" -n -- cgit v1.2.3