From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EJ8yHoRp52Py0AAAbAwnHQ (envelope-from ) for ; Sat, 11 Feb 2023 11:10:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oJzwHYRp52OviwAAauVa8A (envelope-from ) for ; Sat, 11 Feb 2023 11:10:12 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4FA5DF575 for ; Sat, 11 Feb 2023 11:10:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQmon-0004rp-TB; Sat, 11 Feb 2023 05:09:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQmoj-0004om-IT for guix-patches@gnu.org; Sat, 11 Feb 2023 05:09:15 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQmob-00009h-Um for guix-patches@gnu.org; Sat, 11 Feb 2023 05:09:10 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQmob-0004Cv-QR for guix-patches@gnu.org; Sat, 11 Feb 2023 05:09:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61420] [PATCH 11/31] build: haskell-build-system: Process all transitive dependencies. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Feb 2023 10:09:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61420 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61420@debbugs.gnu.org Cc: Lars-Dominik Braun Received: via spool by 61420-submit@debbugs.gnu.org id=B61420.167611013616004 (code B ref 61420); Sat, 11 Feb 2023 10:09:05 +0000 Received: (at 61420) by debbugs.gnu.org; 11 Feb 2023 10:08:56 +0000 Received: from localhost ([127.0.0.1]:38874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQmoR-00049y-Og for submit@debbugs.gnu.org; Sat, 11 Feb 2023 05:08:56 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:34014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQmoH-00046U-Tj for 61420@debbugs.gnu.org; Sat, 11 Feb 2023 05:08:48 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4PDRBt3Rbtz9sd1; Sat, 11 Feb 2023 11:08:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1676110118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ah3AyQLvjUYJOVSsmqYABDJz9QOfK6ca01e3lM387Oc=; b=y4gNM7KnXvuLBOhD0INoJ/2mPxNFTLBMrfeqO9mGDfuyIOghOZZaASp8+TuBTvKsFw57rH 6i12l7ClqGvo6RFUMyOmPXqlFg65kfVmo5Pr4xKn4Y/0Ve0ZJBVlsxZpUF98acp3a70pBs Xp4bNXukh72YJHin6CXSy0BwKZyOHxEZUdEZZl9R3vJsjUIXZa1weow3hvA0bzCSaELaO5 l5GnzJ8YhnZxMbJAwI2+ctrpmKEDdovZ3rhxI8+fO2uswwNdIhilRGrHZDiBiipOFH8lfM OAtl9T8i3X5KpPFsNXSNma0wb/HFCnd9mj51UoNrIfTogXvWgQ3/1RYUQgOnmg== From: Lars-Dominik Braun Date: Sat, 11 Feb 2023 11:08:06 +0100 Message-Id: <20230211100825.47971-9-lars@6xq.net> In-Reply-To: <20230211100825.47971-1-lars@6xq.net> References: <20230211100825.47971-1-lars@6xq.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4PDRBt3Rbtz9sd1 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676110212; a=rsa-sha256; cv=none; b=CeWyfxZ8Egtnjth+d5GbkmiBZWBEYpLe1TKS7hco9YJqr0Z2IAgspIr4FLbL5I3xd+Ejkx UXDn1Rf52hjdWDA5WUJ0plL+pi2WrEAwbZLKlju/SvZ+dPCzl5L48JIUpJ3aMj1etTPxMl sPt1XB8PmKk1Exr9bPO8Aj9yg9v0wE5sPh6T1FNQ4L7SaNrCMHpJ3VeFKm+6neGMoSwSrs usBcRYk0ZqCYXuwXGJAVn/7ktubIdD9esmMHdYN2fITre//Dmrd8mT/xsBWBj9mBHSbxYv uSsvhzfenriExUBpDX+zp8za2D6cedEZ94Aq/aX0FQpS5ouHT5phT+0k57OX9Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=y4gNM7Kn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676110212; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ah3AyQLvjUYJOVSsmqYABDJz9QOfK6ca01e3lM387Oc=; b=T56mHQ7OC+YpI655Xp00/bFQcVjOHc3/B0su0dY+G8QIHIjKDWlrDS+BHswqojyA+RSFe/ r1/lTRfYiumu1TJQoxwkauLsQMexWPz3zXixpzdztf1b58AOwBI60J9W0KALyqyzxgp0c2 zgs0XdEy0D3d1gBshI37W6PzlpQ4e1iOdFK39J9b8ae/c85zlyRlk/+pIYTnX5SsclDM6p Ylk1LhCLzzzN9WSzJDFLq1fkFNZ+Xo1tU6+IW+P1UzkR6ugaOTzjdSU+dXD/+F/avvfTsQ ZAmcHOve3iS7A5R+1o3reKqIp5UANp5K6k7unfLrtWjWQyiY3JQpAGhd5u8s2Q== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=y4gNM7Kn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.20 X-Spam-Score: 7.20 X-Migadu-Queue-Id: 4FA5DF575 X-Migadu-Scanner: scn1.migadu.com X-TUID: SxFwkkkdoX8h A bug caused install-transitive-deps to stop looping if a dependency file already existed in the target directory. For Haskell packages with multiple libraries (like attoparsec) this resulted in missing dependencies and error messages like this: The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used. installed package attoparsec-0.14.4 is broken due to missing package scientific-0.3.7.0-9XG3zUjXOw970JFcruv0cZ See . * guix/build/haskell-build-system.scm (register): Unconditionally loop over all tails. --- guix/build/haskell-build-system.scm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm index fb4aba28ea..72e12ba746 100644 --- a/guix/build/haskell-build-system.scm +++ b/guix/build/haskell-build-system.scm @@ -214,14 +214,16 @@ (define (install-transitive-deps conf-file src dest) (() #t) ;done ((id . tail) (if (not (vhash-assoc id seen)) - (let ((dep-conf (string-append src "/" id ".conf")) - (dep-conf* (string-append dest "/" id ".conf"))) - (unless (file-exists? dep-conf*) - (unless (file-exists? dep-conf) + (let* ((dep-conf (string-append src "/" id ".conf")) + (dep-conf* (string-append dest "/" id ".conf")) + (dep-conf-exists? (file-exists? dep-conf)) + (dep-conf*-exists? (file-exists? dep-conf*)) + (next-tail (append lst (if dep-conf-exists? (conf-depends dep-conf) '())))) + (unless dep-conf*-exists? + (unless dep-conf-exists? (error (format #f "File ~a does not exist. This usually means the dependency ~a is missing. Was checking conf-file ~a." dep-conf id conf-file))) - (copy-file dep-conf dep-conf*) ;XXX: maybe symlink instead? - (loop (vhash-cons id #t seen) - (append lst (conf-depends dep-conf))))) + (copy-file dep-conf dep-conf*)) ;XXX: maybe symlink instead? + (loop (vhash-cons id #t seen) next-tail)) (loop seen tail)))))) (define (install-config-file conf-file dest output:doc output:lib) -- 2.38.2