diff options
| author | nebuli <nebu@kipple> | 2014-12-05 01:28:12 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-12-06 16:03:49 +0100 |
| commit | 847391fe6229bc9b989939470b4a84bd82c75088 (patch) | |
| tree | d88710603c81a30cf80fc8aa48d872bbf254822b /tests/guix-package.sh | |
| parent | 6496de9bc2deb30306922ace8498afa237dee1b1 (diff) | |
guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.
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.
* tests/guix-package.sh: Add test.
* doc/guix.texi (Invoking guix build): Make it clear that the options
are parsed independently.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests/guix-package.sh')
| -rw-r--r-- | tests/guix-package.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 3e0e36fa23c..f4e091a5a2c 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh | |||
| @@ -289,3 +289,16 @@ GUIX_PACKAGE_PATH="$module_dir" | |||
| 289 | export GUIX_PACKAGE_PATH | 289 | export GUIX_PACKAGE_PATH |
| 290 | guix package -A emacs-foo-bar | grep 42 | 290 | guix package -A emacs-foo-bar | grep 42 |
| 291 | guix package -i emacs-foo-bar-42 -n | 291 | guix package -i emacs-foo-bar-42 -n |
| 292 | unset GUIX_PACKAGE_PATH | ||
| 293 | |||
| 294 | # Using 'GUIX_BUILD_OPTIONS'. | ||
| 295 | |||
| 296 | available="`guix package -A | sort`" | ||
| 297 | GUIX_BUILD_OPTIONS="--dry-run" | ||
| 298 | export GUIX_BUILD_OPTIONS | ||
| 299 | |||
| 300 | # Make sure $GUIX_BUILD_OPTIONS is not simply appended to the command-line, | ||
| 301 | # which would break 'guix package -A' and similar. | ||
| 302 | available2="`guix package -A | sort`" | ||
| 303 | test "$available2" = "$available" | ||
| 304 | guix package -I | ||
