mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
pack: Import (guix store database) only when '--localstatedir' is passed.
This is another way to address <https://bugs.gnu.org/32184>, which was previously addressed in commit19c924af4f. * gnu/build/install.scm (register-closure): Move to... * gnu/build/vm.scm (register-closure): ... here. New procedure. * guix/scripts/pack.scm (self-contained-tarball)[build]: Remove now unneeded 'with-extensions' form and custom (guix config) module. * tests/guix-pack.sh: Revert the strategy from commit19c924af4f. * tests/pack.scm ("self-contained-tarball"): Likewise.
This commit is contained in:
@@ -29,33 +29,21 @@ fi
|
||||
|
||||
guix pack --version
|
||||
|
||||
# Starting from commit 66e9944e078cbb9e0d618377dd6df6e639640efa, 'guix pack'
|
||||
# produces derivations that refer to guile-sqlite3 and libgcrypt. To make
|
||||
# that relatively inexpensive, run the test in the user's global store if
|
||||
# possible, on the grounds that binaries may already be there or can be built
|
||||
# or downloaded inexpensively.
|
||||
|
||||
NIX_STORE_DIR="`guile -c '(use-modules (guix config))(display %storedir)'`"
|
||||
localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
|
||||
GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
|
||||
export NIX_STORE_DIR GUIX_DAEMON_SOCKET
|
||||
|
||||
if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
|
||||
then
|
||||
exit 77
|
||||
fi
|
||||
# Use --no-substitutes because we need to verify we can do this ourselves.
|
||||
GUIX_BUILD_OPTIONS="--no-substitutes"
|
||||
export GUIX_BUILD_OPTIONS
|
||||
|
||||
# Build a tarball with no compression.
|
||||
guix pack --compression=none guile-bootstrap
|
||||
guix pack --compression=none --bootstrap guile-bootstrap
|
||||
|
||||
# Build a tarball (with compression). Check that '-e' works as well.
|
||||
out1="`guix pack guile-bootstrap`"
|
||||
out2="`guix pack -e '(@ (gnu packages bootstrap) %bootstrap-guile)'`"
|
||||
out1="`guix pack --bootstrap guile-bootstrap`"
|
||||
out2="`guix pack --bootstrap -e '(@ (gnu packages bootstrap) %bootstrap-guile)'`"
|
||||
test -n "$out1"
|
||||
test "$out1" = "$out2"
|
||||
|
||||
# Build a tarball with a symlink.
|
||||
the_pack="`guix pack -S /opt/gnu/bin=bin guile-bootstrap`"
|
||||
the_pack="`guix pack --bootstrap -S /opt/gnu/bin=bin guile-bootstrap`"
|
||||
|
||||
# Try to extract it. Note: we cannot test whether /opt/gnu/bin/guile itself
|
||||
# exists because /opt/gnu/bin may be an absolute symlink to a store item that
|
||||
|
||||
Reference in New Issue
Block a user