From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41795) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igbXh-0002XK-Sp for guix-patches@gnu.org; Sun, 15 Dec 2019 16:35:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igbXe-00053u-UV for guix-patches@gnu.org; Sun, 15 Dec 2019 16:35:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igbXd-00052n-8t for guix-patches@gnu.org; Sun, 15 Dec 2019 16:35:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1igbXa-0001Ac-7q for guix-patches@gnu.org; Sun, 15 Dec 2019 16:35:02 -0500 Subject: [bug#38630] Software Heritage (swh): Fix API change, causing repeatedly submitting archives Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:40970) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igbXC-0002Wn-Dz for guix-patches@gnu.org; Sun, 15 Dec 2019 16:34:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igbXA-00048i-Vx for guix-patches@gnu.org; Sun, 15 Dec 2019 16:34:38 -0500 Received: from m4s11.vlinux.de ([83.151.27.109]:33202 helo=bjoernhoefling.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1igbXA-00041s-Je for guix-patches@gnu.org; Sun, 15 Dec 2019 16:34:36 -0500 Received: from alma-ubu (p57B526BA.dip0.t-ipconnect.de [87.181.38.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bjoernhoefling.de (Postfix) with ESMTPSA id 782823F836 for ; Sun, 15 Dec 2019 22:34:34 +0100 (CET) Date: Sun, 15 Dec 2019 22:34:33 +0100 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Message-ID: <20191215223433.5ce5be20@alma-ubu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/acxEE_=PrIiNeJps9+HDS6w"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38630@debbugs.gnu.org --Sig_/acxEE_=PrIiNeJps9+HDS6w Content-Type: multipart/mixed; boundary="MP_/6m.0.eo4hoelSsvXGSYoRfc" --MP_/6m.0.eo4hoelSsvXGSYoRfc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Guix, when linting, I recognized that the archival linter was repeatedly sending packages to the SWH, despite that the package was already archived. With some investigations, I noticed they changed the API. Here's a patch that fixes it. I have not communicated with SWH about that, especially I have not asked SWH why they broke the API without updating the version number. Bj=C3=B6rn --MP_/6m.0.eo4hoelSsvXGSYoRfc Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-swh-Fix-API-call-for-getting-origin.patch =46rom a5ada85d168b45d517d8faf0d79ad5beccc26911 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Bj=3DC3=3DB6rn=3D20H=3DC3=3DB6fling?=3D Date: Sun, 15 Dec 2019 22:00:56 +0100 Subject: [PATCH] swh: Fix API call for getting origin. When using the archival linter, git origins already in the archive where not recognized due to an API change and where repeatedly asked for archival. This is fixed here. * guix/swh.scm (lookup-origin): Fix API URI for getting origin. (): Fix comment with API URI example. --- guix/swh.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/swh.scm b/guix/swh.scm index 7acad05928..372e4c84d1 100644 --- a/guix/swh.scm +++ b/guix/swh.scm @@ -244,7 +244,7 @@ FALSE-IF-404? is true, return #f upon 404 responses." docstring (call (swh-url components ...) json->value))))) =20 -;; +;; (define-json-mapping make-origin origin? json->origin (id origin-id) @@ -365,7 +365,7 @@ FALSE-IF-404? is true, return #f upon 404 responses." =20 (define-query (lookup-origin url) "Return an origin for URL." - (path "/api/1/origin/git/url" url) + (path "/api/1/origin" url "get") json->origin) =20 (define-query (lookup-content hash type) --=20 2.23.0 --MP_/6m.0.eo4hoelSsvXGSYoRfc-- --Sig_/acxEE_=PrIiNeJps9+HDS6w Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXfam6QAKCRC/KGy2WT5f /fenAJ9bGb6G8EjV7iP6S4BMKtD2zH5jfQCbBYi4fjTU290htYpCOSewZiFv5Jk= =JIMw -----END PGP SIGNATURE----- --Sig_/acxEE_=PrIiNeJps9+HDS6w--