diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2021-12-10 12:26:29 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2021-12-10 15:32:44 +0100 |
| commit | 71977101218d1fd5d7f5016cbbcb8710be057d49 (patch) | |
| tree | 1748634f97058e9b754df205ab2eaee0ebc041c9 /tests | |
| parent | c879354003df61703c4b6c874650608bf569d77d (diff) | |
shell: When using '-D -f', '-D' has no effect on remaining packages.
Fixes <https://issues.guix.gnu.org/52093>.
Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>.
* guix/scripts/shell.scm (%options): In "--file" handler, add call to
'ensure-ad-hoc'.
* tests/guix-shell.sh: Add test.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/guix-shell.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/guix-shell.sh b/tests/guix-shell.sh index 3bdf625189c..d8cae9d6143 100644 --- a/tests/guix-shell.sh +++ b/tests/guix-shell.sh | |||
| @@ -73,6 +73,20 @@ echo "Broken manifest." > "$tmpdir/manifest.scm" | |||
| 73 | (cd "$tmpdir"; SHELL="$(realpath fake-shell.sh)" guix shell --bootstrap -q) | 73 | (cd "$tmpdir"; SHELL="$(realpath fake-shell.sh)" guix shell --bootstrap -q) |
| 74 | rm "$tmpdir/manifest.scm" | 74 | rm "$tmpdir/manifest.scm" |
| 75 | 75 | ||
| 76 | # Make sure '-D' affects only the immediately following '-f', and not packages | ||
| 77 | # that appear later: <https://issues.guix.gnu.org/52093>. | ||
| 78 | cat > "$tmpdir/empty-package.scm" <<EOF | ||
| 79 | (use-modules (guix) (guix tests) | ||
| 80 | (guix build-system trivial)) | ||
| 81 | |||
| 82 | (dummy-package "empty-package" | ||
| 83 | (build-system trivial-build-system)) ;zero inputs | ||
| 84 | EOF | ||
| 85 | |||
| 86 | guix shell --bootstrap --pure -D -f "$tmpdir/empty-package.scm" \ | ||
| 87 | guile-bootstrap -- guile --version | ||
| 88 | rm "$tmpdir/empty-package.scm" | ||
| 89 | |||
| 76 | if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null | 90 | if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null |
| 77 | then | 91 | then |
| 78 | # Compute the build environment for the initial GNU Make. | 92 | # Compute the build environment for the initial GNU Make. |
