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 ms0.migadu.com with LMTPS id sJwEOxQgtmHrEgEAgWs5BA (envelope-from ) for ; Sun, 12 Dec 2021 17:15:16 +0100 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 6OeKNhQgtmGvHgAAbx9fmQ (envelope-from ) for ; Sun, 12 Dec 2021 16:15:16 +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 092EB49BD for ; Sun, 12 Dec 2021 17:15:16 +0100 (CET) Received: from localhost ([::1]:58044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwRVL-0007ms-6Z for larch@yhetil.org; Sun, 12 Dec 2021 11:15:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwRV9-0007mE-1n for guix-patches@gnu.org; Sun, 12 Dec 2021 11:15:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwRV8-0002Nt-QD for guix-patches@gnu.org; Sun, 12 Dec 2021 11:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwRV8-0000On-MY for guix-patches@gnu.org; Sun, 12 Dec 2021 11:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v3 20/43] guix: node-build-system: Add delete-lockfiles phase. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Dec 2021 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath Cc: 51838@debbugs.gnu.org X-Debbugs-Original-Cc: 51838@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.16393256451411 (code B ref 51838); Sun, 12 Dec 2021 16:15:02 +0000 Received: (at 51838) by debbugs.gnu.org; 12 Dec 2021 16:14:05 +0000 Received: from localhost ([127.0.0.1]:52950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwRUC-0000Mh-U6 for submit@debbugs.gnu.org; Sun, 12 Dec 2021 11:14:05 -0500 Received: from mout.gmx.net ([212.227.15.19]:35299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwRUB-0000M7-7u for 51838@debbugs.gnu.org; Sun, 12 Dec 2021 11:14:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1639325636; bh=ShsU7MimZbBTWyFRSvsZMhCPxt7GqG4mUnnFj/4hxas=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=GGzM+oBSP+pob6Dd+nVfoOl7Z7jOCTbXSJj2CNUuyf8YCgQkSYHB0oikaU4by8GxW wjTE7tJOKxLyak6TUMRBN22drbLDWB7rYogpmyN/nFDxlbGJ1envxG4miHuo//drlN RV3mnkj591jkeCotCURf1kYRGztLjioS5Wv9rk7c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1N7zBR-1mRaZb17el-0153GE; Sun, 12 Dec 2021 17:13:56 +0100 References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-1-philip@philipmcgrath.com> <20211208202838.752542-21-philip@philipmcgrath.com> User-agent: mu4e 1.6.10; emacs 27.2 From: Pierre Langlois Date: Sun, 12 Dec 2021 16:09:59 +0000 In-reply-to: <20211208202838.752542-21-philip@philipmcgrath.com> Message-ID: <87bl1lztq5.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:S/kf7rFYgtKZlGF3nuz8cTAnBqOsWuo3iEWEidxQ2Yramr+z5P8 fsvXtlI+fst8EZDJ0At9fWs+LIPdUcqw6/Nk1WHRe+u2GuDHofC0E27Cqp3SbIbb45muI7U UrzLEWS9veXEUrcLCckciW1zgPS4WdWVF2WnlmASVYweJ+T0k6U46tFOOjn/VVeJKXlP9NA SZrwpmm6LrSesJFHFZBnA== X-UI-Out-Filterresults: notjunk:1;V03:K0:zBo4kj5pxcs=:QcjG22W9RnRJ1fV8ywp3/d KdzLGxCH1NHVvAZWrxQt8YLylUwR7Vo8AoIDX/uSbIdpr/SdqpGUUITFeZ5e2d0oVp8PsUwq9 Q4ALgVadLm2mzQ7boW3LLtgQVskiYgP41o4lbyARkhhacKEIW8wQxv9NGzZNOtmuJegU6TGIN vWzXtjCof61KA0LQtOvxAQgIOi9zg0FLl7IA2b5PTf3k78oycanhXybJe2wQZNS++4M9UQokl iMA8PTHKEgWCFlnG8hsyUDdGffoeukVbfG/B9NTlPF8g9PrQW0vErXtVX544PhdA8ryUkvOFf JU/rCK189SvW3boSRmFp3ATzJV5+T2RG1U6VMWyQ7eyNkQktBPlPtG7cVGrZT2xLOv/6bMtBy EhZgafcfZey0gV1jld4UyyCgjU2LHbM6MoZh0qRcdUDtDMFNu+pWNEhJrIb5B2iXwVBZD94yr XiYwMO3k4zS7agfgg+qSv8fs8rMl1AdemkR36qF6HEgIJUSQ5BSTn4v8g5CRYQKGAglPZOku+ 2G8cxz67qMXfGbUbZMe9/x7G8Q0XVm+y8+4Oa2btVJi8Ku+cFbKq6KNRObn1Ge9eU5KeKernv CfAvKPW+EbPVXlUfvTIe0Mj0fztaJO+lr8JXxNd0xE7aogMpPKC5ypjgjk7bINM8q2JF93XAx +FXAzLLOya9P9NLHI9pf7kI+ap1+vsvS8FsdLC6qSme3qjjV4g6qp9o9q+jfHOp+uR4OrV2xa n2Jak+o/PnGdvWriSyC4KTDkSBmYi8MuB7EVTC4ue0Uljmdu1LL6Y64ge6gTFWW7HLw4Zjw1y lRqHBvMcW5/qrMtmEglc1PNfiw5vch88HNhjnIMloi4fpJgaks9TdAfKn6QFAwvPfmt6f6wUM 6fVoP0Az2ZZ38tOL10h66TPmDAUehbVi5XlW1twUa0MBbfixJSuZbHF/ehU5a+tFUIp4KjdMD XS0S6ug6gEYO1S7Qo1/JP2UxvDO8T75c3oATLruNv1FGln9b3cSCXi5Diy73Ulg4Rf5fhcS/W 3h39tAoGMss/UC/3EqzeJkgkZjs0dIiKn/3j8/cpuWNPrB1VM7JZkB/CQ44Fg2axIJM/eskN5 qbvyAwsbT1yRcQ= 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639325716; 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=o2vA+i5M2vZr5sER+38AMFIHanrUcBn0Vu2CdADKZGw=; b=gaJWw+DK83yOP74vXq3GrweAAp51FsUppwuJyNmOCNaXnRTI5Dp1bREAm3r1B/iJREz/A/ 8XdbZHB82uwS+f/GofJ2wPpeSQmk4H6zd1+goNWzdAWjOC9Fy4Bnfx1ekscIN3Mdz50ag0 VB9rwtT2OMw4vCth8MVeHP9F2ucz2NusCMx+L5woTQyRMh0fA+yNaw7WvnUNqktpa35gHS sqcXjl8hA7fuG28S7tcobaetYwDQgET9bsZhLwXykALwbRJ1Nr74bKaKBEF9bbCHWDdjKm +MSDhBUeXxLufwA+6STErWshGuO8sdhMINT1FSVqOZ23I4vLxCnh9lamHvwemg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639325716; a=rsa-sha256; cv=none; b=hWyHnIy/sddYS47+d9ZdcxcKtFG17i92eA2R0CGMEjK6WOqm3QQsTM2zQk2dLTnb84Ll3D I4K0GHOYNKcAxB1WPxR/k2uL+hjaFVFi/BcemG7/Il8x3FDsmGpE9GoSBV/kiHzOWt2wsa eW4yc2+F+FlA9kxVGoU///kbsaWt9wpxJ2+cQGTfWwJDOyCDdjKGenoubWuH77nn9b1XHt 8fJHEgJOflT1mB5YEs0ZdjjTv2wM8RXcXnWp4zKvaBPjPSUpH5rMWEdohuKby5s/nlMdHr Te+RU1T03uYRg3rQFhSv/JKMvn9nrU5MVndo2gu9ipjfGtwvMr5xMf7t08JE9w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=GGzM+oBS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (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: -3.57 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=GGzM+oBS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (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-Queue-Id: 092EB49BD X-Spam-Score: -3.57 X-Migadu-Scanner: scn1.migadu.com X-TUID: 8x/eD5G8q73h --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Philip McGrath writes: > * guix/build/node-build-system.scm (delete-lockfiles): New function. > Remove 'package-lock.json', 'yarn.lock', and 'npm-shrinkwrap.json', > if they exist. Because these files specify dependency both exact > versions and integrity hashes, they only cause problems for Guix. > (%standard-phases): Add 'delete-lockfiles' after 'patch-dependencies'. > --- > gnu/packages/node.scm | 12 ------------ > guix/build/node-build-system.scm | 12 ++++++++++++ > 2 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm > index 6d48816c77..5289e2fe4f 100644 > --- a/gnu/packages/node.scm > +++ b/gnu/packages/node.scm > @@ -488,12 +488,6 @@ (define-public node-llparse-builder-bootstrap > "typescript") > #:phases > (modify-phases %standard-phases > - (add-before 'configure 'remove-package-lock > - ;; Having package-lock.json seems to cause npm > - ;; to look for things on the internet in the configure phase, > - ;; even if we have them properly installed. > - (lambda args > - (delete-file-recursively "package-lock.json"))) > (replace 'build > (lambda* (#:key inputs #:allow-other-keys) > (let ((esbuild (string-append (assoc-ref inputs "esbuild") > @@ -621,12 +615,6 @@ (define-public node-llparse-bootstrap > "typescript") > #:phases > (modify-phases %standard-phases > - (add-before 'configure 'remove-package-lock > - ;; Having package-lock.json seems to cause npm > - ;; to look for things on the internet in the configure phase, > - ;; even if we have them properly installed. > - (lambda args > - (delete-file-recursively "package-lock.json"))) These changes were added in this series right? I'd suggest to re-order commits to have the build-system changes first so that they don't need to be added at all. > (replace 'build > (lambda* (#:key inputs #:allow-other-keys) > (let ((esbuild (string-append (assoc-ref inputs "esbuild") > diff --git a/guix/build/node-build-system.scm b/guix/build/node-build-sys= tem.scm > index 249b3deee6..892104b6d2 100644 > --- a/guix/build/node-build-system.scm > +++ b/guix/build/node-build-system.scm > @@ -118,6 +118,17 @@ (define (resolve-dependencies meta-alist meta-key) > (write-json package-meta out)))) > #t) >=20=20 > +(define* (delete-lockfiles #:key inputs #:allow-other-keys) > + "Delete 'package-lock.json', 'yarn.lock', and 'npm-shrinkwrap.json', i= f they > +exist." > + (for-each (lambda (pth) > + (when (file-exists? pth) > + (delete-file pth))) > + '("package-lock.json" > + "yarn.lock" > + "npm-shrinkwrap.json")) > + #t) > + > (define* (configure #:key outputs inputs #:allow-other-keys) > (let ((npm (string-append (assoc-ref inputs "node") "/bin/npm"))) > (invoke npm "--offline" "--ignore-scripts" "install") > @@ -168,6 +179,7 @@ (define %standard-phases > (modify-phases gnu:%standard-phases > (add-after 'unpack 'set-home set-home) > (add-before 'configure 'patch-dependencies patch-dependencies) > + (add-after 'patch-dependencies 'delete-lockfiles delete-lockfiles) > (replace 'configure configure) > (replace 'build build) > (replace 'check check) Otherwise LGTM! Thanks, Pierre --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmG2H8IYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UFWQH/0USgXIMwfNz6WpWBwhzrBAb oCcLus/V6Iy/HzXeT/qE6SQam62AcyH0Ahz02ll3/95kFAKXOineIc0UQCt6HOSA sNYh/knI3O7iEtaLuqx0E5ucbofBMngFDGhbIHdLOhDuSTxCg9NDxTPAgrZNXL4E L+uD6kUiYV+vUtukUbFSwfOu/DlzG7pg+U/28/SMk/r/j0avjwUUKKNumzkk7BmR Qdnr4naN7oKr3DGGA0wRzXONiEfdnZ3YX8fepKB7IfG6uDd9IonPn6Ay5Y9qHRbA cU4QxExAmnqzvVST3KMBOSEA0k80fdzevfSD7Fy2bmVmWPTc4UY+YuP5LYuWTvo= =dzQF -----END PGP SIGNATURE----- --=-=-=--