From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MI4DJYlLR2QW9AAASxT56A (envelope-from ) for ; Tue, 25 Apr 2023 05:39:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0LQaJIlLR2RsWQEAG6o9tA (envelope-from ) for ; Tue, 25 Apr 2023 05:39:53 +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 50AAD4057D for ; Tue, 25 Apr 2023 05:39:53 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=GduRF0Op; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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=1682393993; 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: 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=B+Cr4MaoeQjqHPfnCF3uybyFK7lRNwxTDd4Z3B6W79Q=; b=LvTIklsQ7u75VxhIiAAZYTCOU5jIouG5RHlyoho0t1972UExvReVibSK3B1/G7lH4nS9yJ lBNpm3B/K3pKidwUdoqH375YZ1jjoZ5JfaNpizKBecuA0eT2FKu87DWADoLSIff2h8smC3 0sLd8LDHg/kljFCgr1iaL5xqiFMiwJuU8f8NVMvLeN5ldABQs/XQfMIFeke4coj5IWxxsh gNf4B4MK4H5R/Ys7wUwO5/axUAfccGTQPAqzyXVMx+q4lYJQ45fBURG1zgOh+FRmLD3TAJ labf3nKA6MUeAGDHDdedGP5FT+NP5bO/0MUKKUSuv2GYcoH587K4NL6sAdm+Aw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=GduRF0Op; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Seal: i=1; s=key1; d=yhetil.org; t=1682393993; a=rsa-sha256; cv=none; b=ozneBr7AH3aWYQXvBhQcxKmWc5CCYzGhCjLt0F2r3ZzKtQYR+uJUr9bF9stX6wUf3qqwcx ZmRs7yc5xyvo2sC1ooaq7V7vim/eSJZSeXv2+a+Dx+6BanIjXyqiPqohSBBOS09c9EBNQB bNDwIUb4WHe4Yth0Vr4jJwRZLoHJJxa2qyvF959+ln41bzSvYFKvpQlbnv67c+hJ5tRl4L ByVxLAM8M1dCgYNq7JgsXWYSAbJAGfrXkSkbo9E1A/ETPLaZ6ZdiCStqd8WfVyDHXz7Tyz kXfDOcXZ/9yNc9Ax4+Rvwnot+EVDJlpOAfMkymN6VxCngcz1iHNfznj345Tlsw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pr7hv-0002Fu-MG; Mon, 24 Apr 2023 21:43:03 -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 1pr7hu-0002Fl-DQ for bug-guix@gnu.org; Mon, 24 Apr 2023 21:43:02 -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 1pr7ht-0006i8-U4 for bug-guix@gnu.org; Mon, 24 Apr 2023 21:43:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pr7ht-0000bR-PQ for bug-guix@gnu.org; Mon, 24 Apr 2023 21:43:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63043: texlive-font-maps.drv build failure when profiles lacks texlive-* packages Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 25 Apr 2023 01:43: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Ricardo Wurmus , 63043@debbugs.gnu.org Received: via spool by 63043-submit@debbugs.gnu.org id=B63043.16823869322253 (code B ref 63043); Tue, 25 Apr 2023 01:43:01 +0000 Received: (at 63043) by debbugs.gnu.org; 25 Apr 2023 01:42:12 +0000 Received: from localhost ([127.0.0.1]:50812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr7h5-0000aH-Qc for submit@debbugs.gnu.org; Mon, 24 Apr 2023 21:42:12 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:60580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr7h4-0000a5-HC for 63043@debbugs.gnu.org; Mon, 24 Apr 2023 21:42:10 -0400 Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-3e6aa05714bso53756471cf.0 for <63043@debbugs.gnu.org>; Mon, 24 Apr 2023 18:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682386925; x=1684978925; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=B+Cr4MaoeQjqHPfnCF3uybyFK7lRNwxTDd4Z3B6W79Q=; b=GduRF0OpeG7TI6lmfdzv2fR5cWpoO3fwjCPvob/6zfiEkwS0POLOslA+qFkRi+M8ec eSmEiZY0XNhpHhPcLcfctK0QSI2ITsXXXppzv8V7tXlVdoaOTt2a+HHOy99iTlS9oqwz 3V7xIuO4HH1rxIvvhiM13VnFgUUu9D2PmuuYPJFY82lazvVd8ILYNyi67uT2KBHbsw1m 3gyXSRS1WQAufB/USIoHF+NQLihnWlfUh9/fZ7aemZwVGj93wCVx4uDISuKgQhNmipSK s+J3prmDQQYLcqix50qJHXEYuWIfkbiWvT1KK9Bnny7lfg59JhcFgA2Ty53Lr2fwzPHA Eygg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682386925; x=1684978925; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=B+Cr4MaoeQjqHPfnCF3uybyFK7lRNwxTDd4Z3B6W79Q=; b=g1oG0Y0QjdO+8LpRAfUxH+rwXfEBSgfEPiCvleFC3J+/voZK7hw0jZgExkXi3Mbvaj yYlSSGUDN4IuzzaRPETGqRYccixHfnZAuVmbsh7soDMYU8vIq2rFOB3TxvutGBw3ngRj sESJk8Mu8C01bQkPQqrhdBPBU0u+kUE2pskqGod7qsCJBslYOPnmqXsQkhJ4cm0Zsqid 5g2fVbmQ/bXQfYDtTo5+WTy++PQnhp9E0gARKZEFVenXjHMMrJimX0Lm+d4ODk6Zd1eb OVzezBd7vH9F5dvz9okM4idfAJMTnnHX5G/+01Fz09rqbnFz3QF/elw/TL4XA2fqlO19 qXag== X-Gm-Message-State: AAQBX9fBSCijkqi9Dxu2WNwspTkQUdg4B3bj4Xh2+3Kk48g66HlTBVj9 Y5B5VH6tvbX0/ocDOzXibNE= X-Google-Smtp-Source: AKy350YfB93PAf8fOAw92Uj2l+dgMXbGXInr9581c8L5Fi5jzvUUIFhZC6dUTENN5R8eL7QRhD0Z7g== X-Received: by 2002:ac8:7e81:0:b0:3e8:69dd:c62d with SMTP id w1-20020ac87e81000000b003e869ddc62dmr28765373qtj.57.1682386924661; Mon, 24 Apr 2023 18:42:04 -0700 (PDT) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id a9-20020ac844a9000000b003d3a34d2eb2sm4106924qto.41.2023.04.24.18.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 18:42:03 -0700 (PDT) From: Maxim Cournoyer References: <87o7nefba4.fsf@inria.fr> <87zg6yt6ro.fsf@gmail.com> <878reh0yo8.fsf@gnu.org> Date: Mon, 24 Apr 2023 21:41:53 -0400 In-Reply-To: <878reh0yo8.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 24 Apr 2023 23:15:35 +0200") Message-ID: <87edo8sppa.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: UNKNOWN X-Migadu-Spam: Yes X-Migadu-Spam-Score: 8.45 X-Spam-Score: 8.45 X-Migadu-Queue-Id: 50AAD4057D X-Migadu-Scanner: in3.migadu.com X-Spam: Yes X-TUID: MwFpyXHoR1Zx Hi Ludovic, Ludovic Court=C3=A8s writes: > 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 = were 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 inconsis= tent 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 throu= gh >> ;; every input referenced by the manifest, while MANIFEST-I= NPUTS >> ;; only retrieves the immediate inputs as well as their >> ;; propagated inputs; to avoid causing an empty output deri= vation >> ;; 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 = idea > was to take whichever glib/GDK we=E2=80=99d find in the dependency graph,= and > pick the command we need from it. That way, we wouldn=E2=80=99t introduc= e any > additional dependency. That was the reasoning. > > Thinking about, this particular case might be easier: we can make things > consistent like so: > > 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 direct= ories > ;; 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")) >=20=20 > @@ -1867,7 +1868,7 @@ (define build > (install-file (string-append b "/ls-R") a)))))) >=20=20 > (mlet %store-monad ((texlive-base (manifest-lookup-package manifest "t= exlive-base"))) > - (if texlive-base > + (if (and texlive-base (pair? texlive-inputs)) > (gexp->derivation "texlive-font-maps" build > #:substitutable? #f > #:local-build? #t > > > That way, the hook only fire if we have =E2=80=98texlive-base=E2=80=99 (s= omewhere in the > graph) *and* we have texlive-* packages in the manifest. That is equivalent, but it doesn't address the core problem in my opinion. There's no use to run hooks for things which aren't propagated at the level of the profile, I think. If texlive-base in is the profile, the person wants to use tex and friends. But if it's wrapped by some package deep down, we shouldn't care. I see it the same way as when using libraries and compilers in a profile; the compiler (consumer) needs to be present else no search path is created. Does it make sense? --=20 Thanks, Maxim