guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#33802] [PATCH v2] ui: Report profile hooks separately.


From: Ludovic Courtès
Subject: [bug#33802] [PATCH v2] ui: Report profile hooks separately.
Date: Wed, 19 Dec 2018 22:51:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi!

Ricardo Wurmus <address@hidden> 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’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]