GNU bug report logs -
#54539
[PATCH 0/6] Start breaking up import cycles
Previous Next
Reported by: Maxime Devos <maximedevos <at> telenet.be>
Date: Wed, 23 Mar 2022 18:48:01 UTC
Severity: normal
Tags: patch
Done: Andreas Enge <andreas <at> enge.fr>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
This (partially?) breaks a cycle between (gnu packages linux)
and (gnu packages check). There's more work to be done though,
see future patches -- stay tuned!
* gnu/packages/linux.scm
(python-pamela,earlyoom,multipath-tools,mtd-utils,procenv):
Don't import (gnu packages check), instead access that module
via 'module-ref' + 'resolve-interface'.
---
gnu/packages/linux.scm | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c47204dc76..8176533d68 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -92,7 +92,9 @@
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages calendar)
- #:use-module (gnu packages check)
+ ;; Don't import these modules here, otherwise a cycle would result.
+ ;; If needed, use 'module-ref' + 'resolve-interface'.
+ ;; #:use-module (gnu packages check)
#:use-module (gnu packages cpio)
#:use-module (gnu packages crypto)
#:use-module (gnu packages cryptsetup)
@@ -1681,7 +1683,10 @@ at login. Local and dynamic reconfiguration are its key features.")
(inputs
(list linux-pam))
(native-inputs
- (list python-pytest))
+ ;; Avoid adding Pythonland and GNOMEland to the module closure when
+ ;; all we need is util-linux.
+ (list (module-ref (resolve-interface '(gnu packages check))
+ 'python-pytest)))
(home-page "https://github.com/minrk/pamela")
(synopsis "PAM interface using ctypes")
(description "This package provides a PAM interface using @code{ctypes}.")
@@ -3779,7 +3784,10 @@ from the module-init-tools project.")
'())
(list
;; For the test suite.
- cppcheck
+ ;; Avoid adding Pythonland and GNOMEland to the module closure when
+ ;; all we need is util-linux.
+ (module-ref (resolve-interface '(gnu packages check))
+ 'cppcheck)
;; Avoid adding 'golang' and its dependencies Rubyland and
;; Nodeland to the module closure when all we need is util-linux.
(module-ref (resolve-interface '(gnu packages golang)) 'go))))
@@ -5183,7 +5191,10 @@ arrays when needed.")
(native-inputs
(list perl pkg-config valgrind
;; For tests.
- cmocka))
+ ;; Avoid adding Pythonland and GNOMEland to the module closure when
+ ;; all we need is util-linux.
+ (module-ref (resolve-interface '(gnu packages check))
+ 'cmocka)))
(inputs
`(("json-c" ,json-c)
("libaio" ,libaio)
@@ -6594,7 +6605,11 @@ exceeded.")
#~(list)
#~(list "--enable-unit-tests"))))
(native-inputs
- (list cmocka pkg-config))
+ (list ;; Avoid adding Pythonland and GNOMEland to the module closure when
+ ;; all we need is util-linux.
+ (module-ref (resolve-interface '(gnu packages check))
+ 'cmocka)
+ pkg-config))
(inputs
`(("acl" ,acl) ; extended attributes (xattr)
("libuuid" ,util-linux "lib")
@@ -7243,7 +7258,11 @@ the MTP device as a file system.")
(native-inputs
(list pkg-config
;; For tests.
- check groff))
+ ;; Avoid adding Pythonland and GNOMEland to the module closure when
+ ;; all we need is util-linux.
+ (module-ref (resolve-interface '(gnu packages check))
+ 'check)
+ groff))
(inputs
(list expat libcap libselinux))
(synopsis "Utility to show process environment")
--
2.30.2
This bug report was last modified 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.