Commit | Line | Data |
---|---|---|
233e7676 | 1 | # GNU Guix --- Functional package management for GNU |
487cbb01 | 2 | # Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> |
acc08466 | 3 | # Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> |
0afdc485 | 4 | # |
233e7676 | 5 | # This file is part of GNU Guix. |
0afdc485 | 6 | # |
233e7676 | 7 | # GNU Guix is free software; you can redistribute it and/or modify it |
0afdc485 LC |
8 | # under the terms of the GNU General Public License as published by |
9 | # the Free Software Foundation; either version 3 of the License, or (at | |
10 | # your option) any later version. | |
11 | # | |
233e7676 | 12 | # GNU Guix is distributed in the hope that it will be useful, but |
0afdc485 LC |
13 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | # GNU General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU General Public License | |
233e7676 | 18 | # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
0afdc485 LC |
19 | |
20 | # | |
e49951eb | 21 | # Test the `guix package' command-line utility. |
0afdc485 LC |
22 | # |
23 | ||
e49951eb | 24 | guix package --version |
0afdc485 | 25 | |
24e262f0 LC |
26 | readlink_base () |
27 | { | |
28 | basename `readlink "$1"` | |
29 | } | |
30 | ||
e25234e3 | 31 | module_dir="t-guix-package-$$" |
0afdc485 | 32 | profile="t-profile-$$" |
db5a9444 LC |
33 | tmpfile="t-guix-package-file-$$" |
34 | rm -f "$profile" "$tmpfile" | |
0afdc485 | 35 | |
b1fb6634 | 36 | trap 'rm -f "$profile" "$profile.lock" "$profile-"[0-9]* "$tmpfile"; rm -rf "$module_dir" t-home-'"$$" EXIT |
7a6548cb | 37 | |
5d4b411f | 38 | # Use `-e' with a non-package expression. |
d8934360 | 39 | ! guix package --bootstrap -e + |
5d4b411f | 40 | |
aa042770 LC |
41 | # Install a store item and make sure the version and output in the manifest |
42 | # are correct. | |
43 | guix package --bootstrap -p "$profile" -i `guix build guile-bootstrap` | |
44 | test "`guix package -A guile-bootstrap | cut -f 1-2`" \ | |
45 | = "`guix package -p "$profile" -I | cut -f 1-2`" | |
46 | test "`guix package -p "$profile" -I | cut -f 3`" = "out" | |
47 | rm "$profile" | |
48 | ||
e49951eb | 49 | guix package --bootstrap -p "$profile" -i guile-bootstrap |
0afdc485 LC |
50 | test -L "$profile" && test -L "$profile-1-link" |
51 | test -f "$profile/bin/guile" | |
52 | ||
d2952326 LC |
53 | # Make sure the profile is a GC root. |
54 | guix gc --list-live | grep "`readlink "$profile-1-link"`" | |
55 | ||
1c67d639 | 56 | # Installing the same package a second time does nothing. |
e49951eb | 57 | guix package --bootstrap -p "$profile" -i guile-bootstrap |
1c67d639 LC |
58 | test -L "$profile" && test -L "$profile-1-link" |
59 | ! test -f "$profile-2-link" | |
60 | test -f "$profile/bin/guile" | |
0afdc485 | 61 | |
477ee222 LC |
62 | # Collisions are properly flagged (in this case, 'g-wrap' propagates |
63 | # guile@2.2, which conflicts with guile@2.0.) | |
d8934360 | 64 | ! guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0 |
fc95dc4c | 65 | |
477ee222 | 66 | guix package --bootstrap -n -p "$profile" -i g-wrap guile@2.0 \ |
fc95dc4c LC |
67 | --allow-collisions |
68 | ||
5924080d | 69 | # No search path env. var. here. |
dbc31ab2 LC |
70 | guix package -p "$profile" --search-paths |
71 | guix package -p "$profile" --search-paths | grep '^export PATH=' | |
72 | test "`guix package -p "$profile" --search-paths | wc -l`" = 1 # $PATH | |
73 | ( set -e; set -x; \ | |
74 | eval `guix package --search-paths=prefix -p "$PWD/$profile"`; \ | |
75 | test "`type -P guile`" = "$PWD/$profile/bin/guile" ; \ | |
76 | type -P rm ) | |
5924080d | 77 | |
57b86237 | 78 | # Exit with 1 when a generation does not exist. |
d8934360 | 79 | ! guix package -p "$profile" --delete-generations=42 |
57b86237 LC |
80 | |
81 | # Exit with 0 when trying to delete the zeroth generation. | |
82 | guix package -p "$profile" --delete-generations=0 | |
0afdc485 | 83 | |
6447738c | 84 | # Make sure multiple arguments to -i works. |
ccabb664 | 85 | guix package --bootstrap -i guile zile -p "$profile" -n |
6447738c | 86 | |
9518856b | 87 | # Make sure the `:' syntax works. |
ecb1b610 | 88 | guix package --bootstrap -i "glibc:debug" -p "$profile" -n |
9518856b | 89 | |
aa92cf98 | 90 | # Make sure nonexistent outputs are reported. |
e49951eb | 91 | guix package --bootstrap -i "guile-bootstrap:out" -p "$profile" -n |
d8934360 EB |
92 | ! guix package --bootstrap -i "guile-bootstrap:does-not-exist" -p "$profile" -n |
93 | ! guix package --bootstrap -i "guile-bootstrap:does-not-exist" -p "$profile" | |
aa92cf98 | 94 | |
487cbb01 LC |
95 | # Make sure we get an error when trying to remove something that's not |
96 | # installed. | |
d8934360 | 97 | ! guix package --bootstrap -r something-not-installed -p "$profile" |
487cbb01 | 98 | |
64fc89b6 | 99 | # Check whether `--list-available' returns something sensible. |
03f4ef28 | 100 | guix package -p "$profile" -A 'gui.*e' | grep guile |
64fc89b6 | 101 | |
2aa6efb0 | 102 | # Check whether `--show' returns something sensible. |
3ce9aa44 | 103 | guix package --show=guile | grep "^name: guile" |
2aa6efb0 | 104 | |
1b0a86dd | 105 | # Ensure `--show' doesn't fail for packages with non-package inputs. |
5e6feee6 EB |
106 | guix package --show=texlive |
107 | ||
65216315 | 108 | # Fail for non-existent packages or package/version pairs. |
d8934360 EB |
109 | ! guix package --show=does-not-exist |
110 | ! guix package --show=emacs@42 | |
65216315 | 111 | |
1b0a86dd LC |
112 | # Search. |
113 | LC_MESSAGES=C | |
114 | export LC_MESSAGES | |
115 | test "`guix package -s "An example GNU package" | grep ^name:`" = \ | |
116 | "name: hello" | |
117 | test -z "`guix package -s "n0t4r341p4ck4g3"`" | |
118 | ||
db5a9444 LC |
119 | # Search with one and then two regexps. |
120 | # First we get printed circuit boards *and* board games. | |
121 | guix package -s '\<board\>' > "$tmpfile" | |
122 | grep '^name: pcb' "$tmpfile" | |
123 | grep '^name: gnubg' "$tmpfile" | |
124 | ||
125 | # Second we get only board games. | |
126 | guix package -s '\<board\>' -s game > "$tmpfile" | |
127 | grep -v '^name: pcb' "$tmpfile" > /dev/null | |
128 | grep '^name: gnubg' "$tmpfile" | |
129 | ||
130 | rm -f "$tmpfile" | |
131 | ||
0fb40579 LC |
132 | # Make sure deprecated packages don't show up: <https://bugs.gnu.org/30566>. |
133 | mkdir "$module_dir" | |
134 | cat > "$module_dir/foo.scm"<<EOF | |
135 | (define-module (foo) | |
136 | #:use-module (guix packages) | |
137 | #:use-module (gnu packages base)) | |
138 | ||
139 | (define-public deprecated | |
140 | (deprecated-package "fileutils" coreutils)) | |
141 | EOF | |
142 | ||
143 | guix build -L "$module_dir" -e '(@ (foo) deprecated)' -n | |
144 | test "`guix package -L "$module_dir" -s ^fileutils$ | grep ^name:`" = "" | |
145 | ||
146 | rm -rf "$module_dir" | |
147 | ||
1b0a86dd LC |
148 | # Make sure `--search' can display all the packages. |
149 | guix package --search="" > /dev/null | |
150 | ||
d7ddb257 LC |
151 | # There's no generation older than 12 months, so the following command should |
152 | # have no effect. | |
153 | generation="`readlink_base "$profile"`" | |
d8934360 | 154 | ! guix package -p "$profile" --delete-generations=12m |
d7ddb257 LC |
155 | test "`readlink_base "$profile"`" = "$generation" |
156 | ||
d26eb84d LC |
157 | # The following command should not delete the current generation, even though |
158 | # it matches the given pattern (see <http://bugs.gnu.org/19978>.) And since | |
159 | # there's nothing else to delete, it should just fail. | |
160 | guix package --list-generations -p "$profile" | |
d8934360 | 161 | ! guix package --bootstrap -p "$profile" --delete-generations=1.. |
d26eb84d LC |
162 | test "`readlink_base "$profile"`" = "$generation" |
163 | ||
c9323a4c LC |
164 | # Make sure $profile is a GC root at this point. |
165 | real_profile="`readlink -f "$profile"`" | |
d8934360 | 166 | ! guix gc -d "$real_profile" |
c9323a4c LC |
167 | test -d "$real_profile" |
168 | ||
169 | # Now, let's remove all the symlinks to $real_profile, and make sure | |
170 | # $real_profile is no longer a GC root. | |
171 | rm "$profile" "$profile"-[0-9]-link | |
172 | guix gc -d "$real_profile" | |
173 | [ ! -d "$real_profile" ] | |
174 | ||
494dc2fc LC |
175 | # Package transformations. |
176 | ||
177 | # Make sure we get the right version number when using '--with-source'. | |
178 | mkdir "$module_dir" | |
179 | emacs_tarball="$module_dir/emacs-42.5.9rc7.tar.gz" | |
180 | touch "$emacs_tarball" | |
181 | guix package -p "$profile" -i emacs --with-source="$emacs_tarball" -n \ | |
182 | 2> "$tmpfile" | |
c136da3f | 183 | grep -E 'emacs[[:blank:]]+42\.5\.9rc7' "$tmpfile" |
494dc2fc LC |
184 | rm "$emacs_tarball" "$tmpfile" |
185 | rmdir "$module_dir" | |
186 | ||
bc6e291e LC |
187 | # Profiles with a relative file name. Make sure we don't create dangling |
188 | # symlinks--see bug report at | |
189 | # <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>. | |
190 | mkdir -p "$module_dir/foo" | |
191 | ( cd "$module_dir" ; \ | |
192 | guix package --bootstrap -i guile-bootstrap -p foo/prof ) | |
193 | test -f "$module_dir/foo/prof/bin/guile" | |
194 | rm "$module_dir/foo"/* | |
195 | rmdir "$module_dir/foo" | |
196 | rmdir "$module_dir" | |
494dc2fc | 197 | |
67668155 | 198 | # |
0ec1af59 | 199 | # Try with the default profile. |
67668155 | 200 | # |
0ec1af59 LC |
201 | |
202 | XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" | |
203 | export XDG_CACHE_HOME | |
88371f0d | 204 | HOME="$PWD/t-home-$$" |
0ec1af59 LC |
205 | export HOME |
206 | ||
207 | mkdir -p "$HOME" | |
208 | ||
59c51be2 LC |
209 | # Get the canonical directory name so that 'guix package' recognizes it. |
210 | HOME="`cd $HOME; pwd -P`" | |
211 | ||
e49951eb | 212 | guix package --bootstrap -i guile-bootstrap |
0ec1af59 LC |
213 | test -L "$HOME/.guix-profile" |
214 | test -f "$HOME/.guix-profile/bin/guile" | |
24e262f0 | 215 | |
d9307267 LC |
216 | # Move to the empty profile. |
217 | default_profile="`readlink "$HOME/.guix-profile"`" | |
218 | for i in `seq 1 3` | |
219 | do | |
d2952326 LC |
220 | # Make sure the current generation is a GC root. |
221 | profile_link="`readlink "$default_profile"`" | |
222 | guix gc --list-live | grep "`readlink "$profile_link"`" | |
223 | ||
e49951eb | 224 | guix package --bootstrap --roll-back |
d9307267 LC |
225 | ! test -f "$HOME/.guix-profile/bin" |
226 | ! test -f "$HOME/.guix-profile/lib" | |
bc6e291e | 227 | test "`readlink "$default_profile"`" = "`basename $default_profile-0-link`" |
d9307267 | 228 | done |
3b9c0020 | 229 | |
88371f0d LC |
230 | # Check whether '-p ~/.guix-profile' makes any difference. |
231 | # See <http://bugs.gnu.org/17939>. | |
d8934360 EB |
232 | ! test -e "$HOME/.guix-profile-0-link" |
233 | ! test -e "$HOME/.guix-profile-1-link" | |
88371f0d | 234 | guix package --bootstrap -p "$HOME/.guix-profile" -i guile-bootstrap |
d8934360 | 235 | ! test -e "$HOME/.guix-profile-1-link" |
88371f0d | 236 | guix package --bootstrap --roll-back -p "$HOME/.guix-profile" |
d8934360 | 237 | ! test -e "$HOME/.guix-profile-0-link" |
88371f0d | 238 | |
3b9c0020 | 239 | # Extraneous argument. |
d8934360 | 240 | ! guix package install foo-bar |
1a43e4dc LC |
241 | |
242 | # Make sure the "broken pipe" doesn't yield an error. | |
243 | # Note: 'pipefail' is a Bash-specific option. | |
244 | set -o pipefail || true | |
245 | guix package -A g | head -1 2> "$HOME/err1" | |
246 | guix package -I | head -1 2> "$HOME/err2" | |
247 | test "`cat "$HOME/err1" "$HOME/err2"`" = "" | |
300868ba LC |
248 | |
249 | # Make sure '-L' extends the package module search path. | |
300868ba | 250 | mkdir "$module_dir" |
300868ba LC |
251 | |
252 | cat > "$module_dir/foo.scm"<<EOF | |
253 | (define-module (foo) | |
254 | #:use-module (guix packages) | |
255 | #:use-module (gnu packages emacs)) | |
256 | ||
257 | (define-public x | |
258 | (package (inherit emacs) | |
259 | (name "emacs-foo-bar") | |
260 | (version "42"))) | |
261 | EOF | |
262 | ||
263 | guix package -A emacs-foo-bar -L "$module_dir" | grep 42 | |
1b846da8 | 264 | guix package -i emacs-foo-bar@42 -n -L "$module_dir" |
8689901f LC |
265 | |
266 | # Same thing using the 'GUIX_PACKAGE_PATH' environment variable. | |
267 | GUIX_PACKAGE_PATH="$module_dir" | |
268 | export GUIX_PACKAGE_PATH | |
269 | guix package -A emacs-foo-bar | grep 42 | |
1b846da8 | 270 | guix package -i emacs-foo-bar@42 -n |
ee06af5b | 271 | |
002d17dc RV |
272 | # Make sure GUIX_PACKAGE_PATH/'-L' takes precedence in case of duplicate packages. |
273 | cat > "$module_dir/bar.scm"<<EOF | |
274 | (define-module (bar) | |
275 | #:use-module (guix packages)) | |
276 | ||
277 | (define-public hello | |
278 | (package (inherit (@@ (gnu packages base) hello)) | |
279 | (synopsis "an overridden version of GNU hello"))) | |
280 | EOF | |
281 | ||
282 | guix package -i hello -n 2>&1 | grep choosing.*bar.scm | |
283 | ( unset GUIX_PACKAGE_PATH; \ | |
284 | guix package -i hello -n -L "$module_dir" 2>&1 | grep choosing.*bar.scm ) | |
285 | ||
ee06af5b LC |
286 | # Make sure patches that live under $GUIX_PACKAGE_PATH are found. |
287 | cat > "$module_dir/emacs.patch"<<EOF | |
288 | This is a fake patch. | |
289 | EOF | |
290 | cat > "$module_dir/foo.scm"<<EOF | |
291 | (define-module (foo) | |
292 | #:use-module (guix packages) | |
293 | #:use-module (gnu packages) | |
294 | #:use-module (gnu packages emacs)) | |
295 | ||
296 | (define-public x | |
297 | (package (inherit emacs) | |
298 | (source (origin (inherit (package-source emacs)) | |
299 | (patches (list (search-patch "emacs.patch"))))) | |
300 | (name "emacs-foo-bar-patched") | |
301 | (version "42"))) | |
5763ad92 LC |
302 | |
303 | (define-public y | |
304 | (package (inherit emacs) | |
305 | (name "super-non-portable-emacs") | |
306 | (supported-systems '("foobar64-hurd")))) | |
ee06af5b LC |
307 | EOF |
308 | guix package -i emacs-foo-bar-patched -n | |
309 | ||
223d7939 LC |
310 | # Same when -L is used. |
311 | ( unset GUIX_PACKAGE_PATH; \ | |
312 | guix package -L "$module_dir" -i emacs-foo-bar-patched -n ) | |
313 | ||
0d279400 DT |
314 | # Make sure installing from a file works. |
315 | cat > "$module_dir/package.scm"<<EOF | |
316 | (use-modules (gnu)) | |
317 | (use-package-modules bootstrap) | |
318 | ||
319 | %bootstrap-guile | |
320 | EOF | |
321 | guix package --bootstrap --install-from-file="$module_dir/package.scm" | |
322 | ||
f9c04003 LC |
323 | # Make sure an error is raised if the file doesn't return a package. |
324 | cat > "$module_dir/package.scm"<<EOF | |
325 | (use-modules (gnu packages base)) | |
326 | ||
327 | (define my-package coreutils) ;returns *unspecified* | |
328 | EOF | |
d8934360 | 329 | ! guix package --bootstrap --install-from-file="$module_dir/package.scm" |
f9c04003 LC |
330 | |
331 | rm "$module_dir/package.scm" | |
332 | ||
5763ad92 LC |
333 | # This one should not show up in searches since it's no supported on the |
334 | # current system. | |
335 | test "`guix package -A super-non-portable-emacs`" = "" | |
336 | test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: " | |
337 | ||
fc8fdcf5 LC |
338 | # Don't upgrade packages marked for removal: <http://bugs.gnu.org/27262>. |
339 | guix package --bootstrap -p "$profile" -i guile-bootstrap | |
340 | ||
341 | cat > "$module_dir/foo.scm"<<EOF | |
342 | (define-module (foo) | |
343 | #:use-module (guix) | |
344 | #:use-module (gnu packages bootstrap)) | |
345 | ||
346 | (define-public x | |
347 | (package (inherit %bootstrap-guile) (version "42"))) | |
348 | EOF | |
349 | ||
350 | guix package --bootstrap -p "$profile" -r guile-bootstrap -u guile | |
351 | test ! -f "$profile/bin/guile" | |
352 | guix package --bootstrap -p "$profile" --roll-back | |
353 | test -f "$profile/bin/guile" | |
354 | rm "$profile-2-link" | |
355 | ||
847391fe DP |
356 | unset GUIX_PACKAGE_PATH |
357 | ||
fc8fdcf5 | 358 | |
847391fe | 359 | # Using 'GUIX_BUILD_OPTIONS'. |
847391fe | 360 | available="`guix package -A | sort`" |
442a6ff5 | 361 | GUIX_BUILD_OPTIONS="--dry-run --no-grafts" |
847391fe DP |
362 | export GUIX_BUILD_OPTIONS |
363 | ||
364 | # Make sure $GUIX_BUILD_OPTIONS is not simply appended to the command-line, | |
365 | # which would break 'guix package -A' and similar. | |
366 | available2="`guix package -A | sort`" | |
367 | test "$available2" = "$available" | |
368 | guix package -I | |
1b676447 | 369 | |
442a6ff5 LC |
370 | # Restore '--no-grafts', which makes sure we don't end up building stuff when |
371 | # '--dry-run' is passed. | |
372 | GUIX_BUILD_OPTIONS="--no-grafts" | |
1b676447 | 373 | |
5f1087c4 | 374 | # Applying a manifest file. |
1b676447 DT |
375 | cat > "$module_dir/manifest.scm"<<EOF |
376 | (use-package-modules bootstrap) | |
377 | ||
378 | (packages->manifest (list %bootstrap-guile)) | |
379 | EOF | |
380 | guix package --bootstrap -m "$module_dir/manifest.scm" | |
381 | guix package -I | grep guile | |
382 | test `guix package -I | wc -l` -eq 1 | |
811b21fb LC |
383 | guix package --rollback --bootstrap |
384 | ||
bf9206d8 LC |
385 | # Applying two manifests. |
386 | cat > "$module_dir/manifest2.scm"<<EOF | |
387 | (use-modules (gnu packages bootstrap) (guix)) | |
388 | (define p (package (inherit %bootstrap-guile) (name "eliug"))) | |
389 | (packages->manifest (list p)) | |
390 | EOF | |
391 | guix package --bootstrap \ | |
392 | -m "$module_dir/manifest.scm" -m "$module_dir/manifest2.scm" | |
393 | guix package -I | grep guile | |
394 | guix package -I | grep eliug | |
395 | test `guix package -I | wc -l` -eq 2 | |
396 | guix package --rollback --bootstrap | |
397 | ||
811b21fb LC |
398 | # Applying a manifest file with inferior packages. |
399 | cat > "$module_dir/manifest.scm"<<EOF | |
400 | (use-modules (guix inferior)) | |
401 | ||
402 | (define i | |
403 | (open-inferior "$abs_top_srcdir" #:command "scripts/guix")) | |
404 | ||
405 | (let ((guile (car (lookup-inferior-packages i "guile-bootstrap")))) | |
406 | (packages->manifest (list guile))) | |
407 | EOF | |
408 | guix package --bootstrap -m "$module_dir/manifest.scm" | |
409 | guix package -I | grep guile | |
410 | test `guix package -I | wc -l` -eq 1 | |
5f1087c4 LC |
411 | |
412 | # Error reporting. | |
413 | cat > "$module_dir/manifest.scm"<<EOF | |
414 | (use-package-modules bootstrap) | |
415 | (packages->manifest | |
416 | (list %bootstrap-guile | |
417 | wonderful-package-that-does-not-exist)) | |
418 | EOF | |
419 | if guix package --bootstrap -n -m "$module_dir/manifest.scm" \ | |
420 | 2> "$module_dir/stderr" | |
421 | then false | |
422 | else | |
423 | cat "$module_dir/stderr" | |
ae0307f7 | 424 | grep "manifest.scm:[1-3]:.*wonderful-package.*: unbound variable" \ |
5f1087c4 LC |
425 | "$module_dir/stderr" |
426 | fi | |
387e6b9e CM |
427 | |
428 | # Verify that package outputs are included in search results. | |
429 | rm -rf "$module_dir" | |
430 | mkdir "$module_dir" | |
431 | cat > "$module_dir/foo.scm"<<EOF | |
432 | (define-module (foo) | |
433 | #:use-module (guix packages) | |
434 | #:use-module (guix build-system trivial)) | |
435 | ||
436 | (define-public dummy-package | |
437 | (package | |
438 | (name "dummy-package") | |
439 | (version "dummy-version") | |
440 | (outputs '("out" "dummy-output")) | |
441 | (source #f) | |
3972dc5d | 442 | ;; Without a real build system, the "guix package -s" command will fail. |
387e6b9e CM |
443 | (build-system trivial-build-system) |
444 | (synopsis "dummy-synopsis") | |
445 | (description "dummy-description") | |
446 | (home-page "https://dummy-home-page") | |
447 | (license #f))) | |
448 | EOF | |
449 | guix package -L "$module_dir" -s dummy-output > /tmp/out | |
450 | test "`guix package -L "$module_dir" -s dummy-output | grep ^name:`" = "name: dummy-package" | |
451 | rm -rf "$module_dir" | |
3972dc5d LC |
452 | |
453 | # Make sure we can see user profiles. | |
454 | guix package --list-profiles | grep "$profile" | |
455 | guix package --list-profiles | grep '\.guix-profile' | |
b1fb6634 JL |
456 | |
457 | # Make sure we can properly lock a profile. | |
458 | mkdir "$module_dir" | |
dac7928d LC |
459 | echo "(open-output-file \"$module_dir/ready\") (sleep 60)" \ |
460 | > "$module_dir/manifest.scm" | |
b1fb6634 JL |
461 | guix package -m "$module_dir/manifest.scm" -p "$module_dir/profile" & |
462 | pid=$! | |
dac7928d | 463 | while [ ! -f "$module_dir/ready" ] ; do sleep 0.5 ; done |
b1fb6634 JL |
464 | if guix install emacs -p "$module_dir/profile"; then kill $pid; false; else true; fi |
465 | kill $pid |