From patchwork Wed Mar 23 18:48:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 38028 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 7200727BBEA; Wed, 23 Mar 2022 18:50:43 +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 E58E327BBE9 for ; Wed, 23 Mar 2022 18:50:42 +0000 (GMT) Received: from localhost ([::1]:56358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX64A-0005a2-2F for patchwork@mira.cbaines.net; Wed, 23 Mar 2022 14:50:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX63Z-0005V5-AW for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52126) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX63X-0003EA-Uv 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 1nX63X-0001G4-SI for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH 5/6] gnu: earlyoom: Avoid importing Goland and Haskelland 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:03 +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.16480613534710 (code B ref 54539); Wed, 23 Mar 2022 18:50:03 +0000 Received: (at 54539) by debbugs.gnu.org; 23 Mar 2022 18:49:13 +0000 Received: from localhost ([127.0.0.1]:46010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62j-0001Dn-7z for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:13 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62Z-0001Cl-OT 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 9up12700i4UW6Th01up2oM; Wed, 23 Mar 2022 19:49:03 +0100 From: Maxime Devos Date: Wed, 23 Mar 2022 18:48:54 +0000 Message-Id: <20220323184855.25241-5-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=nFb6CvzUz3RXDGjRAiW/qxxObFrfdZz5S4mjDITBWbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ntvIyHggthW2KnUEbxGGn3AaSxvl55RRAMQEV4NR5ZHhtpQhG/zYKbwdTtz4jqvIB yS8MV5rlBUKsWJmSUYmP8imtHXL1U9pBgdczDsd8yiXbNPYLmoFRacK/qBYvZEZGcj n+XeCH1lLApwfRZlCU11XYkdVznPpDHAKz6TxA2g5FCwt68WNGtGB0RWe9ekhBXZQK K6yG3VQgL53MSMNb2xSVqYiVFrZpRgQprj87wABftsX5lgZCOMt3LH3JEjztHpLN4u ztQ/4CPt0QUK2sQKtH+rwWEUQuubkOhgEaUqIr/uy1Bx/E/fWwDt24ADevP+jV4vUX HFxxcjyGSseKg== 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), (gnu packages haskell-xyz) and (gnu packages golang). It seems a bit cheaty to me but it works. * gnu/packages/linux.scm (earlyoom): Use 'module-ref' and friends to access 'go' and 'pandoc'. Remove now unneeded imports. --- gnu/packages/linux.scm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5a0c5650e4..c47204dc76 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -52,7 +52,7 @@ ;;; Copyright © 2020 pukkamustard ;;; Copyright © 2021 B. Wilson ;;; Copyright © 2021 Ivan Gankevich -;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021,2022 Maxime Devos ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021 Felix Gruber @@ -110,12 +110,13 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) - #:use-module (gnu packages golang) + ;; Don't import these modules here, otherwise a cycle would result. + ;; #:use-module (gnu packages golang) #:use-module (gnu packages gperf) #:use-module (gnu packages gstreamer) - ;; Don't import that module here, otherwise a cycle would result. + ;; Don't import these modules here, otherwise a cycle would result. ;; #:use-module (gnu packages gtk) - #:use-module (gnu packages haskell-xyz) + ;; #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages libunwind) #:use-module (gnu packages libusb) #:use-module (gnu packages llvm) @@ -3771,12 +3772,17 @@ from the module-init-tools project.") (append ;; To generate the manpage. (if (or (target-x86-64?) (target-x86-32?)) - (list pandoc) + ;; Avoid adding Haskelland to the module closure + ;; when all we need is util-linux. + (list (module-ref (resolve-interface '(gnu packages haskell-xyz)) + 'pandoc)) '()) (list ;; For the test suite. cppcheck - go))) + ;; 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)))) (home-page "https://github.com/rfjakob/earlyoom") (synopsis "Simple out of memory (OOM) daemon for the Linux kernel") (description "Early OOM is a minimalist out of memory (OOM) daemon that