From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2KQZGef1WV8YcgAA0tVLHw (envelope-from ) for ; Thu, 10 Sep 2020 09:46:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uHftFOf1WV+GPgAAbx9fmQ (envelope-from ) for ; Thu, 10 Sep 2020 09:46:15 +0000 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 7D1EC940415 for ; Thu, 10 Sep 2020 09:46:14 +0000 (UTC) Received: from localhost ([::1]:35700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJ9g-0004UA-1O for larch@yhetil.org; Thu, 10 Sep 2020 05:46:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJ8Y-0003UO-BM for guix-patches@gnu.org; Thu, 10 Sep 2020 05:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJ8Y-0004Vw-1x for guix-patches@gnu.org; Thu, 10 Sep 2020 05:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kGJ8X-00014M-WE for guix-patches@gnu.org; Thu, 10 Sep 2020 05:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43193] [PATCH] guix: Add --with-dependency-source option Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Sep 2020 09:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43193 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jesse Gibbons Cc: 43193@debbugs.gnu.org Received: via spool by 43193-submit@debbugs.gnu.org id=B43193.15997310464024 (code B ref 43193); Thu, 10 Sep 2020 09:45:01 +0000 Received: (at 43193) by debbugs.gnu.org; 10 Sep 2020 09:44:06 +0000 Received: from localhost ([127.0.0.1]:37141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGJ7e-00012l-6m for submit@debbugs.gnu.org; Thu, 10 Sep 2020 05:44:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGJ7c-000128-MV for 43193@debbugs.gnu.org; Thu, 10 Sep 2020 05:44:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55080) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJ7X-0004QE-CQ; Thu, 10 Sep 2020 05:43:59 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=40476 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kGJ7W-0007CV-Qk; Thu, 10 Sep 2020 05:43:59 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <9c3a00ba-19bf-a8e9-8803-d150e91f1b6e@gmail.com> Date: Thu, 10 Sep 2020 11:43:50 +0200 In-Reply-To: <9c3a00ba-19bf-a8e9-8803-d150e91f1b6e@gmail.com> (Jesse Gibbons's message of "Thu, 3 Sep 2020 22:30:02 -0600") Message-ID: <87y2lige5l.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: eA3xAXAfKFxo Hi Jesse, Jesse Gibbons skribis: > =C2=A0=C2=A0=C2=A0 The attached patch adds support for the --with-depende= ncy-source > common build option. It can be used to specify the sources of > dependencies of specified packages. With this step, we can close > #42155. This is also a step in closing #43061. Excellent! > Note that I suggested making a new > --with-dependency-source=3Dpackage=3Dsource build option in response to > #42155 and nobody responded with an objection. So I am sending this > patch with the assumption that there are no objections to this new > build option, and that if a member of the community wants to > completely replace the behavior of --with-source with the behavior of > the new option, that person can do the work required to not break > --with-source=3Dsource. OK. Like I wrote at , I wouldn=E2=80= =99t mind simply calling this new option =E2=80=98--with-source=E2=80=99. What = we=E2=80=99d lose by doing so is the warning you get if you do =E2=80=98--with-source=3Ddoes-not-exist=3Dwhatever=E2=80=99, saying the opt= ion had no effect, but that=E2=80=99s about it. The new =E2=80=98--with-source=E2=80= =99 behavior (recursive) would be consistent with the other options, which, to me, is more important. WDYT? >>>From 91a89277067fd454ad77edb3a09ed06382f3694c Mon Sep 17 00:00:00 2001 > From: Jesse Gibbons > Date: Thu, 3 Sep 2020 17:45:08 -0600 > Subject: [PATCH v1 1/1] guix: Add --with-dependency-source option > > * guix/scripts/build.scm: (transform-package-inputs/source): new > function > (evaluate-source-replacement-specs): new function > (%transformations): add with-dependency-source option > (%transformation-options): add with-dependency-source-option > (show-transformation-options-help): document --with-dependency-source [...] > +(define (evaluate-source-replacement-specs specs proc) > + "Parse SPECS, a list of strings like \"guile=3D/path/to/source\", and = return a > +list of package pairs, where (PROC PACKAGE URL) returns the replacement = package. > +Raise an error if an element of SPECS uses invalid syntax, or if a packa= ge it > +refers to could not be found." > + (map (lambda (spec) > + (match (string-tokenize spec %not-equal) > + ((spec url) > + (define (replace old) > + (proc old url)) > + (cons spec replace)) > + (x > + (leave (G_ "invalid replacement specification: ~s~%") spec))= )) ^ Add =E2=80=9Csource=E2=80=9D here. It=E2=80=99s always a good idea to not = have the exact same error message in several places. :-) Could you: 1. adjust doc/guix.texi accordingly? That is, if we rename this new option to =E2=80=98--with-source=E2=80=99, simply add a note stating t= hat it=E2=80=99s recursive. 2. add a test to tests/guix-build.sh? There are already --with-source tests in other files. You can mimic them, essentially to make sure the option has an effect. 3. optionally add an entry as a separate commit to etc/news.scm. I can do that for you if you want. Thanks! Ludo=E2=80=99.