From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +CSVEckER2R0hwAASxT56A (envelope-from ) for ; Tue, 25 Apr 2023 00:38:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IEiVEckER2T1OwEA9RJhRA (envelope-from ) for ; Tue, 25 Apr 2023 00:38:01 +0200 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 BC99A25EB5 for ; Tue, 25 Apr 2023 00:38:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pr3XZ-0005al-Ur; Mon, 24 Apr 2023 17:16:05 -0400 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 1pr3XX-0005Ye-8p for bug-guix@gnu.org; Mon, 24 Apr 2023 17:16:03 -0400 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 1pr3XW-0003EP-K3 for bug-guix@gnu.org; Mon, 24 Apr 2023 17:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pr3XV-0001Yb-V8 for bug-guix@gnu.org; Mon, 24 Apr 2023 17:16:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63043: texlive-font-maps.drv build failure when profiles lacks texlive-* packages Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 24 Apr 2023 21:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63043 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: Ricardo Wurmus , 63043@debbugs.gnu.org Received: via spool by 63043-submit@debbugs.gnu.org id=B63043.16823709475960 (code B ref 63043); Mon, 24 Apr 2023 21:16:01 +0000 Received: (at 63043) by debbugs.gnu.org; 24 Apr 2023 21:15:47 +0000 Received: from localhost ([127.0.0.1]:50477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr3XG-0001Y4-EC for submit@debbugs.gnu.org; Mon, 24 Apr 2023 17:15:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr3XE-0001Xr-7F for 63043@debbugs.gnu.org; Mon, 24 Apr 2023 17:15:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr3X8-0003CX-Oy; Mon, 24 Apr 2023 17:15:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=padbyC3jtO6ge36b0ph6s173QadZaCz8jn10g/Ybyfg=; b=Yinmfw0DqIVq4xP6iIXM aPYyH4lEoKZRxBG91eqgjbaLIWaNe8ulVE6UgEXG3YzY3wa4Jv6r4xK5JYz293zW2coacjyjBqZFb PxDzkrPatRYBefHqQiz37SJkPB9ZOwXpQvyAO8zrS5+MxqDpkP/XeHv8B9r2CKDYIsrORv3RCXWhV X6zy3/OEDwx6Gooo0KYh/yDDXTH0Iyk47eJzQnypIvUV2M1Ba+J80QQlz40EaWNS3YrsaT+8O9de5 cUxAbnIUV99WpmyaEyZLZvvLDFu+6ipCtInMMwkLm8bhu0xwahr4NoxH4e0AkTaJyg+V7oAEGdWWF wlVsLdKG63FQAw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr3X8-0002Cx-9U; Mon, 24 Apr 2023 17:15:38 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87o7nefba4.fsf@inria.fr> <87zg6yt6ro.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 =?UTF-8?Q?Flor=C3=A9al?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Rossignol X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 24 Apr 2023 23:15:35 +0200 In-Reply-To: <87zg6yt6ro.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 23 Apr 2023 21:20:59 -0400") Message-ID: <878reh0yo8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682375881; a=rsa-sha256; cv=none; b=Jjfc/kE5vxIKfCl1DBWH7ScSsBcj0/wV+Au0r1eHjuJEwU/oB33vBLEizVVv37qbusi/8t uZCy1mcpDtA89sChvqO1B9fxBlIlnoS+YA1MLmUP8nsBjEZuOuyZ/rkp5sLW4ccI1QxgJt eAWUZgM8+J74F+izDENG9iZSxJnwsF7lYE9oEVwdMhtZscXm0Rb8HfEyZXIdL5dC4+kaK6 vV6toYhqzVk3HfCLuS6pcflEGiKcyJqCRBHY4b1Bm0bZBh+2oRK3vcz6A8Y9L5K+j/+tij AMhgGWu2/XxFMOacjUMPCQtqL4QOH+MyFr5tFVZakaXnrNdlKZsRsWIVktW/oA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Yinmfw0D; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682375881; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=padbyC3jtO6ge36b0ph6s173QadZaCz8jn10g/Ybyfg=; b=J9H593a1TN/pPRm0qAMVhEq6SRv48WfXRj2+bUT2SIjTc56bhaZfkRemJ4/oLyd66jw8eF SMn/Rk9FsKRDLL3e+Z6RJuXOgXHvWXNWeZ7JJWcg4woBJyElY8Ji2ozr41bBNdgXwpQEik POZo7tpDlLv7aq8Dy082nsf5nx82v44z4ZLW6ORLjLIfbegLLWt8+ycuSlcefCPXY6yRJ7 N0JWPou1BnamjwEUjHWqoP7b0Hc7p9DzKopu4eV9Uj+mWMghiAC7QJJio16KqCHGgUS2jf Ly0EaLGKWd0KIl2631dzbSQdL9A0R5DFyj+uxAt3Gs2m2G+kzDUtFT90Fo9eBQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Yinmfw0D; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.61 X-Spam-Score: -2.61 X-Migadu-Queue-Id: BC99A25EB5 X-TUID: KwRUy1u0NtFV --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: > >> Hi! >> >> (Cc: Maxim who may be familiar with the =E2=80=98texlive-font-maps=E2=80= =99 hook.) > > Did you checked with Ricardo? They were the author of that hook, per > git blame :-). I didn=E2=80=99t even look at =E2=80=98git blame=E2=80=99, I thought you we= re the one behind this iteration :-), but Ricardo and I discussed it briefly on IRC. Anyway, extending Cc! >> There are probably two things to fix: >> >> 1. The =E2=80=98manifest-lookup-package=E2=80=99 check seems inconsist= ent with what=E2=80=99s >> passed to =E2=80=98union-build=E2=80=99. > > I think this is the problem to fix. It's non-intuitive that > manifest-lookup-package transitively looks for things instead of looking > at the profile. I actually got tripped by that as well when I authored > gdk-pixbuf-loaders-cache-file, so there's now a comment in that same > file that reads: > > ;; XXX: MANIFEST-LOOKUP-PACKAGE transitively searches through > ;; every input referenced by the manifest, while MANIFEST-IN= PUTS > ;; only retrieves the immediate inputs as well as their > ;; propagated inputs; to avoid causing an empty output deriv= ation > ;; we must ensure that the inputs contain at least one > ;; loaders.cache file. This is why we include gdk-pixbuf or > ;; librsvg when they are transitively found. > > I think we need a 'manifest-lookup-inputs' or similar that stops at the > profile, to work at the same depth as manifest-inputs. Then it wouldn't > find texlive-base and the hook wouldn't run (and fail). There were cases (like GDK pixbuf, GLib schemas, and all that) where the id= ea was to take whichever glib/GDK we=E2=80=99d find in the dependency graph, a= nd pick the command we need from it. That way, we wouldn=E2=80=99t introduce = any additional dependency. That was the reasoning. Thinking about, this particular case might be easier: we can make things consistent like so: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/profiles.scm b/guix/profiles.scm index 03333785f9..41f3e25bb3 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1786,6 +1786,8 @@ (define entry->texlive-input (cons (gexp-input thing output) (append-map entry->texlive-input deps)) '())))) + (define texlive-inputs + (append-map entry->texlive-input (manifest-entries manifest))) (define texlive-bin (module-ref (resolve-interface '(gnu packages tex)) 'texlive-bin)) (define coreutils @@ -1809,8 +1811,7 @@ (define build ;; that TeX live can resolve the parent and grandparent directories ;; correctly. There might be a more elegant way to accomplish this. (union-build "/tmp/texlive" - '#$(append-map entry->texlive-input - (manifest-entries manifest)) + '#$texlive-inputs #:create-all-directories? #t #:log-port (%make-void-port "w")) @@ -1867,7 +1868,7 @@ (define build (install-file (string-append b "/ls-R") a)))))) (mlet %store-monad ((texlive-base (manifest-lookup-package manifest "texlive-base"))) - (if texlive-base + (if (and texlive-base (pair? texlive-inputs)) (gexp->derivation "texlive-font-maps" build #:substitutable? #f #:local-build? #t --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable That way, the hook only fire if we have =E2=80=98texlive-base=E2=80=99 (som= ewhere in the graph) *and* we have texlive-* packages in the manifest. Thoughts? Ludo=E2=80=99. --=-=-=--