[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49149] [PATCH 4/7] pack: Improve naming of the packs store file nam
From: |
Maxime Devos |
Subject: |
[bug#49149] [PATCH 4/7] pack: Improve naming of the packs store file names. |
Date: |
Mon, 21 Jun 2021 20:11:54 +0200 |
User-agent: |
Evolution 3.34.2 |
Maxim Cournoyer schreef op ma 21-06-2021 om 02:12 [-0400]:
> Instead of just naming them by their pack type, add information from the
> package(s) they contain to make it easier to differentiate them.
>
> * guix/scripts/pack.scm (manifest->friendly-name): Extract procedure from ...
> (docker-image): ... here. Adjust REPOSITORY argument value accordingly.
> (guix-pack): Derive NAME using MANIFEST->FRIENDLY-NAME.
> ---
> guix/scripts/pack.scm | 44 +++++++++++++++++++++++++------------------
> 1 file changed, 26 insertions(+), 18 deletions(-)
>
> diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
> index 7ea97a4b7a..9d4bb9f497 100644
> --- a/guix/scripts/pack.scm
> +++ b/guix/scripts/pack.scm
> @@ -172,6 +172,23 @@ dependencies are registered."
> (computed-file "store-database" build
> #:options `(#:references-graphs ,(zip labels items))))
>
> +;;; XXX: The following procedure has to *also* be used in the build side
> +;;; G-Exp, because PROFILE is passed as a derivation in the tests.
> +(define define-manifest->friendly-name
> + '(define (manifest->friendly-name manifest) [...]))
>
> +(eval define-manifest->friendly-name (current-module))
You can avoid 'eval' here by defining 'manifest->friendly-name
in a separate guix/build/pack-utils.scm module.
Alternatively, some macroology (untested, may need some tweaks):
(define-syntax define-gexp-and-expand
((_ variable code code* ...)
(begin (define variable #~(code code* ...))
code code* ...)))
(define-gexp-and-expand define-manifest->friendly-name
(define (manifest->friendly-name manifest)
[... docstring]
[... all the code]))
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
- [bug#49149] [PATCH 0/7] Add deb format for guix pack., Maxim Cournoyer, 2021/06/21
- [bug#49149] [PATCH 1/7] pack: Extract builder code from self-contained-tarball., Maxim Cournoyer, 2021/06/21
- [bug#49149] [PATCH] tentatively reuse rlib for cargo-build-system, Maxim Cournoyer, 2021/06/21
- [bug#49149] [PATCH 2/7] pack: Factorize base tar options., Maxim Cournoyer, 2021/06/21
- [bug#49149] [PATCH 6/7] tests: pack: Fix compressor extension., Maxim Cournoyer, 2021/06/21
- [bug#49149] [PATCH 7/7] pack: Add support for the deb format., Maxim Cournoyer, 2021/06/21
- [bug#49149] [PATCH 3/7] pack: Fix typo., Maxim Cournoyer, 2021/06/21
- [bug#49149] [PATCH 4/7] pack: Improve naming of the packs store file names., Maxim Cournoyer, 2021/06/21
- [bug#49149] [PATCH 4/7] pack: Improve naming of the packs store file names.,
Maxime Devos <=
- [bug#49149] [PATCH 4/7] pack: Improve naming of the packs store file names., Maxim Cournoyer, 2021/06/22
- [bug#49149] [PATCH 4/7] pack: Improve naming of the packs store file names., Maxime Devos, 2021/06/23
- [bug#49149] [PATCH v2 1/7] pack: Extract builder code from self-contained-tarball., Maxim Cournoyer, 2021/06/24
- [bug#49149] [PATCH v2 2/7] pack: Factorize base tar options., Maxim Cournoyer, 2021/06/24
- [bug#49149] [PATCH v2 3/7] pack: Fix typo., Maxim Cournoyer, 2021/06/24
- [bug#49149] [PATCH v2 4/7] pack: Improve naming of the packs store file names., Maxim Cournoyer, 2021/06/24
- [bug#49149] [PATCH 0/7] Add deb format for guix pack., Maxim Cournoyer, 2021/06/26
- [bug#49149] [PATCH 0/7] Add deb format for guix pack., Ludovic Courtès, 2021/06/30
- [bug#49149] [PATCH 0/7] Add deb format for guix pack., Maxim Cournoyer, 2021/06/30
- [bug#49149] [PATCH v2 6/7] tests: pack: Fix compressor extension., Maxim Cournoyer, 2021/06/24