From patchwork Wed Mar 23 18:48:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 38027 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BC62527BBEA; Wed, 23 Mar 2022 18:50:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D154227BBE9 for ; Wed, 23 Mar 2022 18:50:41 +0000 (GMT) Received: from localhost ([::1]:56296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX648-0005Wb-WC for patchwork@mira.cbaines.net; Wed, 23 Mar 2022 14:50:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX63Z-0005V4-AT for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX63Y-0003EC-Co for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nX63Y-0001GB-BB for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH 6/6] gnu: linux: Avoid importing (gnu packages check) to break cycles. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Mar 2022 18:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54539@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 54539-submit@debbugs.gnu.org id=B54539.16480613544716 (code B ref 54539); Wed, 23 Mar 2022 18:50:04 +0000 Received: (at 54539) by debbugs.gnu.org; 23 Mar 2022 18:49:14 +0000 Received: from localhost ([127.0.0.1]:46012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62j-0001Dv-LN for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:14 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62Z-0001Cm-Sl for 54539@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:05 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 9up12700i4UW6Th01up3oP; Wed, 23 Mar 2022 19:49:03 +0100 From: Maxime Devos Date: Wed, 23 Mar 2022 18:48:55 +0000 Message-Id: <20220323184855.25241-6-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220323184855.25241-1-maximedevos@telenet.be> References: <20220323184855.25241-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648061343; bh=BTuP7W7CivJKtyGhDtNZyfv9SEmp1sqFHFJFh+iEacE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ezcefkVO4F3qZsrnbVyqGBd4/51FqRc+6hqVGHLMOsPGvBz4dO1/IkSLLBX4mhfL+ QtcjoWQTZhEg479uxBpkxerNdCgR/cx4d99OASkn0V22Jwslh4lQMDsgLMuBNKpWQ1 4+Py5o0bUhMo8JijEroN06anSFk4qo87eXuuqr9HGl3UelQMFk8zlyRcKBxokIXRZ3 dtUSWiLRA7Mfh+5JK2p3tGp8XBqDK3vVOB56q80nR/XW5kc2HGe/LIquWcODyEp10N 5jXUNw9z9x+RjUBo3YlNES2syEUgalI6m1qQliTri7jMtO5EWe2kRvi9PI/BnmzUDJ cWZVZ8fsrTHmw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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")