GNU bug report logs - #68716
Modularize gnome-desktop-service

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Thu, 25 Jan 2024 16:14:02 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 68716 <at> debbugs.gnu.org (full text, mbox):

From: Vivien Kraus <vivien <at> planete-kraus.eu>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 68716 <at> debbugs.gnu.org
Cc: rg <at> raghavgururajan.name, maxim.cournoyer <at> gmail.com
Subject: Re: [bug#68716] [PATCH gnome-team RFC 1/3] services: Modularise
 gnome-desktop-configuration.
Date: Thu, 25 Jan 2024 18:12:09 +0100
Hello!

Thank you for this series.

Le jeudi 25 janvier 2024 à 16:35 +0100, Liliana Marie Prikler a écrit :
>  (define (gnome-udev-rules config)
>    "Return the list of GNOME dependencies that provide udev rules."
> -  (let ((gnome (gnome-desktop-configuration-gnome config)))
> -    (gnome-packages gnome '("gnome-settings-daemon"))))
> +  (let* ((gnome (gnome-desktop-configuration-gnome config))
> +         (shell (gnome-desktop-configuration-shell config)))
> +    (or (any (match-lambda
> +               ((and pkg (= package-name "gnome-settings-daemon"))
> +                (list pkg))
> +               (_ #f))
> +             shell)
> +        (and (maybe-value-set? gnome)
> +             (gnome-packages gnome '("gnome-settings-daemon")))
> +        (raise
> +         (condition
> +          (&error-location
> +           (location (gnome-desktop-configuration-source-location
> config)))
> +          (&message (message (G_ "Missing gnome-settings-
> daemon"))))))))
>  
Is there a reason why we can’t just add everything (like what your new
gnome-profile function does)?

As far as I understand, the user doesn’t have a say over which
individual rules will be used, among the rules that come from the same
package. So if we want the user to have full control over the rules
that are picked, then the current configuration record does not allow
sufficient precision.

Also, we now have udev hardware files. I’m not sure we have any GNOME
packages that install hardware files, but the user might have some. The
gnome-udev-rules function name is misleading now (sorry, my bad, I
should have renamed it when the udev service changed), because every
package listed here will also have its hardware files installed, not
just rules. If you want to pick rules separately from hardware files,
you have to use file->udev-rule, file->udev-hardware (or udev-rule and
udev-hardware) from (gnu services base).

> @@ -1422,7 +1566,7 @@ (define gnome-desktop-service-type
>            (service-extension polkit-service-type
>                               gnome-polkit-settings)
>            (service-extension profile-service-type
> -                             (compose list gnome-desktop-
> configuration-gnome))))
> +                             gnome-profile)))
>     (default-value (gnome-desktop-configuration))
>     (description "Run the GNOME desktop environment.")))
I think the gnome-desktop-service-type could be easily made extensible,
so that e.g a gnome-circle-service-type could add all the circles
applications in their respective sections.

Maybe it could be extended with other instances of gnome-desktop-
configuration? It looks to me that merging multiple instances is quite
easy, as you could just merge the lists for each category, and the
"gnome" field of the extension could simply be ignored. There are still
issues, such as: how can a service extension replace a package with a
conflicting one. Maybe that case is too far out of scope.

That being said, the extensibility of the gnome-desktop-service-type is
not very much needed, because we can also extend the udev, polkit and
profile services directly.

Other than that, the series looks great to me!

Vivien




This bug report was last modified 1 year and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.