Nikita Karetnikov <[email protected]> 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 <[email protected]> > 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’.
