From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 23 09:08:58 2023 Received: (at 61684) by debbugs.gnu.org; 23 Feb 2023 14:08:58 +0000 Received: from localhost ([127.0.0.1]:33446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVCHJ-00066s-Fy for submit@debbugs.gnu.org; Thu, 23 Feb 2023 09:08:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVCHI-00066e-8A for 61684@debbugs.gnu.org; Thu, 23 Feb 2023 09:08:56 -0500 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 1pVCHD-0007Vu-1p; Thu, 23 Feb 2023 09:08:51 -0500 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=5p0ajXHisnitoNjesBYu6nmsUB/ZBXBWTQ8E9e8+97o=; b=Ju4/03ztd74l92KyuL3H JYeEPLRMTE9tuWIIWdJitDio2nFOEniMchuvu7FnIQSJXZo5hNltK4/StTz49yOilXMTP5HiojVYe m2/ypj6qW/jhB9YYPe+dtwy0pHfWYXSORXX2ImjbkHcjwndOzs8cfwgU1E98JS1Jr3olqQjuHQkp+ YzVtZ5ii6hypwRMrVMCXBKbAReA4XwbTmy3vr9TW8xekrRC/J11W5i9y+ZhCWi4jvTALy0ptRSCNy qPYJ59pPQDoBZNRR8iBxbiKwsTE1lSCxWOFHrzE+bmjuTOZRlxsPDncVebKqN2JtXK4EDVmV18py1 +vMCyWhyfGh3uw==; 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 1pVCHC-0007Jg-IX; Thu, 23 Feb 2023 09:08:50 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#61684: can't compose 'with-patch' with 'with-source' References: <87mt56gac6.fsf@gmail.com> Date: Thu, 23 Feb 2023 15:08:48 +0100 In-Reply-To: <87mt56gac6.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 21 Feb 2023 13:08:41 -0500") Message-ID: <871qmg79u7.fsf@gnu.org> 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61684 Cc: 61684@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Maxim, Maxim Cournoyer skribis: > Given 'with-source' discards any patch from the original source, I thought > I could at least add them back via 'with-patch', but it appears this > does not work: > > scheme@(gnu packages jami)> (options->transformation=20 > `((with-source . "libjami@20230220.0=3D/home= /maxim/src/jami/jami-20230220.0.tar.gz") > (with-patch . ,(string-append=20 > "libjami=3D" (search-patch= =20 > "jami-disable-= integration-tests.patch"))))) > $6 =3D # > scheme@(gnu packages jami)> ($6 libjami) > $7 =3D # > scheme@(gnu packages jami)> (package-source $7) > $8 =3D #< uri: "/home/maxim/src/jami/jami-20230220.0.tar= .gz" recursive?: #t> > scheme@(gnu packages jami)> > > The downloaded-file resulting package source has lost the patch, and no > error got produced, leaving the user to discover this limitation by > themselves. The order of options matters; in this case, you need to do it the other way around: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (options->transformation '((with-patch . "jami=3D/tmp/= t.patch") (with-source . "jami=3Dhttp://example.org/foo.tar.gz"))) $18 =3D # scheme@(guile-user)> ($18 jami) $19 =3D # scheme@(guile-user)> (package-source $19) $20 =3D #< name: "jami-20230206.0-source" gexp: # guile: #f options: (#:local-build= ? #t)> --8<---------------cut here---------------end--------------->8--- The bit comes from the =E2=80=98with-patch=E2=80=99 transfo= rmation, to apply the patch to the . If you do it the other way around, the effect of =E2=80=98with-patch=E2=80= =99 is canceled by that of =E2=80=98with-source=E2=80=99, which does not preserve = patches. So strictly speaking, both options had an effect, but they were contradictory. Note that ordering is =E2=80=9Cspecified=E2=80=9D, notably with the test ad= ded in 0f024554e63a49e20c2a7a67e928073c266bf5c5 (this is crucial for our HPC users, who routinely combine a whole bunch of options; you have no idea how far they go once you give them the tool :-)). I don=E2=80=99t think the manual explicitly states it though. HTH, Ludo=E2=80=99.