[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] guix package: Show which generation is the current one.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] guix package: Show which generation is the current one. |
Date: |
Tue, 24 Sep 2013 14:45:58 +0200 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Nikita Karetnikov <address@hidden> skribis:
> Will these lines be i18n’d? I fail to configure the locales properly,
> so I can’t check.
>
> + (format #t "~a\t(current)~%" header)
> + (format #t "~a~%" header)))
Change the first one to:
(format #t (_ "~a\t(current)~%") header)
That will internationalize it.
> From 7759ad3ad89d236e766639c0875540e60a503d16 Mon Sep 17 00:00:00 2001
> From: Nikita Karetnikov <address@hidden>
> Date: Tue, 24 Sep 2013 05:41:32 +0000
> Subject: [PATCH] guix package: Show which generation is the current one.
>
> * guix/scripts/package.scm (guix-package)[process-query]: Show that a
> generation is the current one if the profile points to it.
> * tests/guix-package.sh: Test it.
> ---
> guix/scripts/package.scm | 17 ++++++++++++-----
> tests/guix-package.sh | 3 +++
> 2 files changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
> index 9ed499d..a8dfcbc 100644
> --- a/guix/scripts/package.scm
> +++ b/guix/scripts/package.scm
> @@ -955,13 +955,20 @@ more information.~%"))
> (match (assoc-ref opts 'query)
> (('list-generations pattern)
> (define (list-generation number)
> + (define (current-generation? number)
> + (let ((generation (format #f "~a-~a-link" profile number)))
> + (string=? (readlink profile) generation)))
Could we instead of a global (current-generation-number profile)
procedure? We’d store the number in a local variable here, to avoid
repeated ‘readlink’ calls.
Other than that I’m fine with the patch.
Thanks,
Ludo’.
- [PATCH] guix package: Add '--delete-generations'., Nikita Karetnikov, 2013/09/22
- Generation 0 (was: [PATCH] guix package: Add '--delete-generations'.), Nikita Karetnikov, 2013/09/22
- Re: Generation 0, Ludovic Courtès, 2013/09/22
- Re: Generation 0, Nikita Karetnikov, 2013/09/23
- [PATCH] guix package: Show which generation is the current one. (was: Generation 0), Nikita Karetnikov, 2013/09/24
- Re: [PATCH] guix package: Show which generation is the current one.,
Ludovic Courtès <=
- Re: [PATCH] guix package: Show which generation is the current one., Nikita Karetnikov, 2013/09/24
- Re: [PATCH] guix package: Show which generation is the current one., Ludovic Courtès, 2013/09/24
- Re: [PATCH] guix package: Show which generation is the current one., Nikita Karetnikov, 2013/09/24
- Re: [PATCH] guix package: Show which generation is the current one., Ludovic Courtès, 2013/09/25
- Re: Generation 0, Ludovic Courtès, 2013/09/24
- Re: Generation 0, Nikita Karetnikov, 2013/09/24
- Re: Generation 0, Ludovic Courtès, 2013/09/25
- Re: Generation 0, Nikita Karetnikov, 2013/09/25
- Re: Generation 0, Ludovic Courtès, 2013/09/25
- Re: Generation 0, Nikita Karetnikov, 2013/09/25