Subject: [bug#51428] core-updates-frozen-batched-changes built and ready to merge

From: Maxim Cournoyer <[email-masked]>
Date: Wed, 27 Oct 2021 13:51:26 -0400

Hello,

Ludovic Courtès <[email-masked]> writes:

> Hi,
>
> Maxim Cournoyer <[email-masked]> skribis:
>
>> This paves the way toward properly fixing https://issues.guix.gnu.org/50957.
>>
>> * guix/profiles.scm (gdk-pixbuf-loaders-cache-file): Add procedure...
>> (%default-profile-hooks): ... and register it as a profile hook.
>
> [...]
>
>> +  (mlet %store-monad ((%gdk-pixbuf (manifest-lookup-package
>> +                                    manifest "gdk-pixbuf"))
>
> You could call it ‘gdk-pixbuf?’ since it’s used as a boolean.
>
>> +        (gexp->derivation "gdk-pixbuf-loaders-cache-file" build
>> +                          #:local-build? #t
>> +                          #:substitutable? #f
>> +                          #:properties
>> +                          '((type . profile-hook)
>> +                            (hook . gdk-pixbuf-loaders-cache-file)))

Good idea; done:

modified   guix/profiles.scm
@@ -1167,8 +1167,8 @@ (define (gdk-pixbuf-loaders-cache-file manifest)
   (define gdk-pixbuf                    ;lazy reference
     (module-ref (resolve-interface '(gnu packages gtk)) 'gdk-pixbuf))
 
-  (mlet %store-monad ((%gdk-pixbuf (manifest-lookup-package
-                                    manifest "gdk-pixbuf"))
+  (mlet %store-monad ((%gdk-pixbuf? (manifest-lookup-package
+                                     manifest "gdk-pixbuf"))
                       (gdk-pixbuf-bin -> (file-append gdk-pixbuf "/bin")))
     (define build
       (with-imported-modules (source-module-closure
@@ -1178,7 +1178,7 @@ (define build
             (setenv "PATH" (string-append #$gdk-pixbuf-bin ":" (getenv "PATH")))
             (generate-gdk-pixbuf-loaders-cache '#$(manifest-inputs manifest)
                                                (list #$output)))))
-    (if %gdk-pixbuf
+    (if %gdk-pixbuf?
         (gexp->derivation "gdk-pixbuf-loaders-cache-file" build
                           #:local-build? #t
                           #:substitutable? #f
                           
> No showstopper but we should eventually add this to (guix status) for
> nicer reporting.
>
> My 2¢,
> Ludo’.

Thanks, I was wondering why the hook message output looked different.

Done, like:

modified   guix/status.scm
@@ -381,6 +381,8 @@ (define (hook-message hook-type)
      (G_ "building CA certificate bundle..."))
     ('emacs-subdirs
      (G_ "listing Emacs sub-directories..."))
+    ('gdk-pixbuf-loaders-cache-file
+     (G_ "generating GdkPixbuf loaders cache..."))
     ('glib-schemas
      (G_ "generating GLib schema cache..."))
     ('gtk-icon-themes

Maxim