GNU bug report logs - #66525
[PATCH 0/7] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls)

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Fri, 13 Oct 2023 15:47:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 66525 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>, Lars-Dominik Braun <lars <at> 6xq.net>, Marius Bakke <marius <at> gnu.org>, Munyoki Kilyungi <me <at> bonfacemunyoki.com>, jgart <jgart <at> dismail.de>
Subject: [bug#66525] [PATCH v2 03/10] gnu: python-dbusmock: Remove dependency on (guix build syscalls).
Date: Sun, 22 Oct 2023 15:43:27 +0200
Having a dependency on (guix build syscalls) this deep in the stack
would make it much harder to change syscalls.scm.

* gnu/packages/python-xyz.scm (python-dbusmock)[native-inputs]: Remove TINY.
[arguments]: Remove #:imported-modules, and remove (guix build syscalls)
from #:modules.  Rewrite ‘check’ phase to reap processes from the build
process itself.
---
 gnu/packages/python-xyz.scm | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d094c6e451..782d1fae6f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27165,12 +27165,10 @@ (define-public python-dbusmock
          "1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g"))))
     (build-system python-build-system)
     (arguments
-     `(#:imported-modules (,@%python-build-system-modules
-                           (guix build syscalls))
-       #:modules ((guix build python-build-system)
-                  (guix build syscalls)
+     `(#:modules ((guix build python-build-system)
                   (guix build utils)
                   (ice-9 match))
+
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-paths
@@ -27186,20 +27184,20 @@ (define-public python-dbusmock
              (when tests?
                (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.
-                  (execlp "tini" "--" "pytest" "-vv"))
-                 (pid
-                  (match (waitpid pid)
-                    ((_ . status)
-                     (unless (zero? status)
-                       (error "`pytest' exited with status"
-                              status))))))))))))
+                  (execlp "pytest" "pytest" "-vv"))
+                 (pytest-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 pytest-pid)
+                           (unless (zero? status)
+                             (error "`pytest' exited with status" status))
+                           (loop)))))))))))))
     (native-inputs
-     (list dbus python-pytest tini which))
+     (list dbus python-pytest which))
     (inputs
      (list dbus))
     (propagated-inputs
-- 
2.41.0





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

Previous Next


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