diff mbox series

[bug#66525,v2,01/10] gnu: mutter: Remove dependency on (guix build syscalls).

Message ID f893b135abe82b276dee940ce9e2c46c93f468a2.1697982039.git.ludo@gnu.org
State New
Headers show
Series Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls) | expand

Commit Message

Ludovic Courtès Oct. 22, 2023, 1:43 p.m. UTC
* gnu/packages/gnome.scm (mutter)[arguments]: Remove #:imported-modules.
Remove (guix build syscalls) from #:modules.
Rewrite ‘check’ phase to reap processes from the build process.
[native-inputs]: Remove TINI.
---
 gnu/packages/gnome.scm | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 2ffe8dfef2..ac3035e07d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7831,10 +7831,7 @@  (define-public mutter
     (build-system meson-build-system)
     (arguments
      (list
-      #:imported-modules `(,@%meson-build-system-modules
-                           (guix build syscalls))
       #:modules '((guix build meson-build-system)
-                  (guix build syscalls)
                   (guix build utils)
                   (ice-9 match))
       #:glib-or-gtk? #t
@@ -7928,22 +7925,22 @@  (define-public mutter
                             "1"))
                 (match (primitive-fork)
                   (0                    ;child process
-                   (set-child-subreaper!)
-                   ;; Use tini so that signals are properly handled and
-                   ;; doubly-forked processes get reaped; otherwise,
-                   ;; python-dbusmock would waste time polling for the dbus
-                   ;; processes it spawns to be reaped, in vain.
-                   (apply execlp "tini" "--"
-                          "dbus-run-session" "--"
+                   (apply execlp "dbus-run-session" "dbus-run-session"
                           "xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
                           "meson" "test" "-t" "0" "--print-errorlogs"
                           test-options))
-                  (pid
-                   (match (waitpid pid)
-                     ((_ . status)
-                      (unless (zero? status)
-                        (error "`meson test' exited with status"
-                               status))))))))))))
+                  (dbus-pid
+                   (let loop ()
+                     ;; Reap child processes; otherwise, python-dbusmock would
+                     ;; waste time polling for the dbus processes it spawns to
+                     ;; be reaped, in vain.
+                     (match (waitpid WAIT_ANY)
+                       ((pid . status)
+                        (if (= pid dbus-pid)
+                            (unless (zero? status)
+                              (error "`meson test' exited with status"
+                                     status))
+                            (loop)))))))))))))
     (native-inputs
      (list desktop-file-utils           ;for update-desktop-database
            `(,glib "bin")               ;for glib-compile-schemas, etc.
@@ -7964,8 +7961,7 @@  (define-public mutter
            pipewire
            python
            python-dbus
-           python-dbusmock
-           tini))                       ;acting as init (zombie reaper)
+           python-dbusmock))
     (propagated-inputs
      (list gsettings-desktop-schemas-next ;required by libmutter.pc
            gtk+                           ;required by libmutter.pc