[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50967] [PATCH 3/3] guix: scripts: Make sure profile directory exist
From: |
Oleg Pykhalov |
Subject: |
[bug#50967] [PATCH 3/3] guix: scripts: Make sure profile directory exists. |
Date: |
Tue, 05 Oct 2021 13:20:32 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Oleg Pykhalov <go.wigust@gmail.com> writes:
> * guix/scripts/home.scm (process-action): Make sure profile directory exists.
> * tests/guix-home.sh: New file.
> * Makefile.am (SH_TESTS): Add this.
> ---
> Makefile.am | 1 +
> guix/scripts/home.scm | 2 ++
> tests/guix-home.sh | 73 +++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 76 insertions(+)
> create mode 100644 tests/guix-home.sh
>
> diff --git a/Makefile.am b/Makefile.am
> index b66789fa0b..5bf2567dc8 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -546,6 +546,7 @@ SH_TESTS = \
> tests/guix-package-aliases.sh \
> tests/guix-package-net.sh \
> tests/guix-system.sh \
> + tests/guix-home.sh \
> tests/guix-archive.sh \
> tests/guix-authenticate.sh \
> tests/guix-environment.sh \
> diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
> index 75df6d707d..115dfadb57 100644
> --- a/guix/scripts/home.scm
> +++ b/guix/scripts/home.scm
> @@ -1,6 +1,7 @@
> ;;; GNU Guix --- Functional package management for GNU
> ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
> ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
> +;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -179,6 +180,7 @@ ACTION must be one of the sub-commands that takes a home
> environment
> declaration as an argument (a file name.) OPTS is the raw alist of options
> resulting from command-line parsing."
> (define (ensure-home-environment file-or-exp obj)
> + (ensure-profile-directory)
> (unless (home-environment? obj)
> (leave (G_ "'~a' does not return a home environment ~%")
> file-or-exp))
> diff --git a/tests/guix-home.sh b/tests/guix-home.sh
> new file mode 100644
> index 0000000000..e79982b7f7
> --- /dev/null
> +++ b/tests/guix-home.sh
> @@ -0,0 +1,73 @@
> +#!/bin/sh
> +
> +# GNU Guix --- Functional package management for GNU
> +# Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
> +#
[…]
Well, guix home reconfigure will break your ~/.bashrc. Sorry.
Don't use this "test".
signature.asc
Description: PGP signature
[bug#50967] [PATCH 14/14] doc: Document guix home import., Oleg Pykhalov, 2021/10/02
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Ludovic Courtès, 2021/10/04
[bug#50967] [PATCH 3/3] guix: scripts: Make sure profile directory exists., Oleg Pykhalov, 2021/10/06
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Oleg Pykhalov, 2021/10/06
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Maxime Devos, 2021/10/07
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Oleg Pykhalov, 2021/10/07
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Maxime Devos, 2021/10/07
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Ludovic Courtès, 2021/10/08
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Ludovic Courtès, 2021/10/08
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Oleg Pykhalov, 2021/10/09
[bug#50967] [PATCH 00/12] Move (gnu home-services XYZ) to (gnu services XYZ), Oleg Pykhalov, 2021/10/09