From 9fd7b050e2198c89f0763fe79f5c541b77b8e5c9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 10 Jan 2021 15:50:30 +0100 Subject: guix package: Add '--export-manifest'. * guix/scripts/package.scm (export-manifest): New procedure. (show-help, %options): Add '--export-manifest'. (process-query): Honor it. * guix/build/profiles.scm (build-profile): Mention it. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it. --- tests/guix-package.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/guix-package.sh') diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 3e5fa71d20..7eaad6823f 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès # Copyright © 2013 Nikita Karetnikov # # This file is part of GNU Guix. @@ -395,6 +395,14 @@ EOF guix package --bootstrap -m "$module_dir/manifest.scm" guix package -I | grep guile test `guix package -I | wc -l` -eq 1 + +# Export a manifest, instantiate it, and make sure we get the same profile. +profile_directory="$(readlink -f "$default_profile")" +guix package --export-manifest > "$tmpfile" +guix package --rollback --bootstrap +guix package --bootstrap -m "$tmpfile" +test "$(readlink -f "$default_profile")" = "$profile_directory" + guix package --rollback --bootstrap # Applying two manifests. -- cgit v1.2.3