From: "Ludovic Courtès" <ludo@gnu.org>
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: 33802@debbugs.gnu.org
Subject: [bug#33802] [PATCH v2] ui: Report profile hooks separately.
Date: Wed, 19 Dec 2018 22:51:07 +0100 [thread overview]
Message-ID: <875zvptcc4.fsf@gnu.org> (raw)
In-Reply-To: <20181219133629.472-1-ricardo.wurmus@mdc-berlin.de> (Ricardo Wurmus's message of "Wed, 19 Dec 2018 14:36:29 +0100")
Hi!
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> * guix/ui.scm (profile-hook-derivation?): New procedure.
> (show-what-to-build): Distinguish among BUILD derivations that match
> 'profile-hook-derivation?'. Report them separately.
> * guix/status.scm (hook-message): New procedure.
> (print-build-event): Display profile hooks with readable hook name.
> * guix/profiles.scm (info-dir-file, ghc-package-cache-file,
> ca-certificate-bundle, glib-schemas, gtk-icon-themes, gtk-im-modules,
> xdg-desktop-database, xdg-mime-database, fonts-dir-file, manual-database):
> Augment derivation with "type" and "hook" properties.
Really cool!
> +(define (hook-message hook-type)
> + "Return a human-readable string for the profile hook type HOOK-TYPE."
> + (match hook-type
> + ('info-dir
> + "building directory of Info manuals...")
> + ('ghc-package-cache
> + "building GHC package cache...")
> + ('ca-certificate-bundle
> + "building CA certificate bundle...")
> + ('glib-schemas
> + "generating Glib schema cache...")
s/Glib/GLib/ :-)
> + ('gtk-icon-themes
> + "creating GTK+ icon theme cache...")
> + ('gtk-im-modules
> + "building cache files for GTK+ input methods...")
> + ('xdg-desktop-database
> + "building XDG desktop file cache...")
> + ('xdg-mime-database
> + "building XDG MIME database...")
> + ('fonts-dir
> + "building fonts directory...")
> + ('manual-database
> + "building database for manual pages...")
> + (_
> + (format #f "running profile hook of type '~a'...~%" hook-type))))
You need to wrap each of these strings in (G_ …), so that xgettext will
find them, and…
> (define* (print-build-event event old-status status
> #:optional (port (current-error-port))
> #:key
> @@ -336,6 +363,8 @@ addition to build events."
> "applying ~a grafts for ~a..."
> count))
> count drv)))
> + ('profile-hook
> + (format port (info (G_ (hook-message (assq-ref properties 'hook))))))
^
… remove the ‘G_’ call from here.
Thanks!
Ludo’.
next prev parent reply other threads:[~2018-12-19 21:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 12:56 [bug#33802] [PATCH] ui: Report profile hooks separately Ricardo Wurmus
2018-12-19 13:36 ` [bug#33802] [PATCH v2] " Ricardo Wurmus
2018-12-19 21:51 ` Ludovic Courtès [this message]
2018-12-19 22:46 ` bug#33802: " Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zvptcc4.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=33802@debbugs.gnu.org \
--cc=ricardo.wurmus@mdc-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).