diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-10-13 15:52:43 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-10-13 15:56:56 +0200 |
| commit | 8b192c5550213911f930594f4fd7386f36618237 (patch) | |
| tree | ab0a0715f95d0db36e1d6ccba7aff4ab194188ce /tests/guix-environment-container.sh | |
| parent | 10d429f2fce321d8285684503094694ec3979865 (diff) | |
shell: Handle '--emulate-fhs' in 'guix shell', not in 'guix environment'.
Previously, using 'guix shell -CF coreutils' twice (such that the
profile is cache) would result in:
guix shell: error: '--profile' cannot be used with package options
This patch fixes it by moving argument handling to (guix scripts shell),
before 'options-with-caching' is called.
* guix/scripts/environment.scm (show-environment-options-help)
(%options): Remove '--emulate-fhs'.
(guix-environment*): Pass OPTS as-is to 'options/resolve-packages'.
* guix/scripts/shell.scm (show-help, %options): Add '--emulate-fhs'.
Add the (expression . ...) component to RESULT right from the argument
handler.
* tests/guix-environment-container.sh: Change '--emulate-fhs' tests to
use 'guix shell' instead of 'guix environment'.
Diffstat (limited to 'tests/guix-environment-container.sh')
| -rw-r--r-- | tests/guix-environment-container.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh index 898c57f41bf..f233c3fcc07 100644 --- a/tests/guix-environment-container.sh +++ b/tests/guix-environment-container.sh | |||
| @@ -217,7 +217,7 @@ fi | |||
| 217 | # Test that the container has FHS specific files/directories. Note that /bin | 217 | # Test that the container has FHS specific files/directories. Note that /bin |
| 218 | # exists in a non-FHS container as it will contain sh, a symlink to the bash | 218 | # exists in a non-FHS container as it will contain sh, a symlink to the bash |
| 219 | # package, so we don't test for it. | 219 | # package, so we don't test for it. |
| 220 | guix environment -C --emulate-fhs --ad-hoc --bootstrap guile-bootstrap \ | 220 | guix shell -C --emulate-fhs --bootstrap guile-bootstrap \ |
| 221 | -- guile -c '(exit (and (file-exists? "/etc/ld.so.cache") | 221 | -- guile -c '(exit (and (file-exists? "/etc/ld.so.cache") |
| 222 | (file-exists? "/lib") | 222 | (file-exists? "/lib") |
| 223 | (file-exists? "/sbin") | 223 | (file-exists? "/sbin") |
| @@ -229,5 +229,5 @@ guix environment -C --emulate-fhs --ad-hoc --bootstrap guile-bootstrap \ | |||
| 229 | (file-exists? "/usr/share")))' | 229 | (file-exists? "/usr/share")))' |
| 230 | 230 | ||
| 231 | # Test that the ld cache was generated and can be successfully read. | 231 | # Test that the ld cache was generated and can be successfully read. |
| 232 | guix environment -C --emulate-fhs --ad-hoc --bootstrap guile-bootstrap \ | 232 | guix shell -CF --bootstrap guile-bootstrap \ |
| 233 | -- guile -c '(execlp "ldconfig" "ldconfig" "-p")' | 233 | -- guile -c '(execlp "ldconfig" "ldconfig" "-p")' |
