From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTT7q-0006aO-ND for guix-patches@gnu.org; Mon, 25 Dec 2017 08:49:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTT7n-0000jt-5D for guix-patches@gnu.org; Mon, 25 Dec 2017 08:49:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:42542) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eTT7m-0000jQ-Vk for guix-patches@gnu.org; Mon, 25 Dec 2017 08:49:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eTT7m-00023t-KG for guix-patches@gnu.org; Mon, 25 Dec 2017 08:49:02 -0500 Subject: [bug#29847] [PATCH] import: pypi: Stay in the REPL if fail to get a source Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTT6t-0006P0-Lp for guix-patches@gnu.org; Mon, 25 Dec 2017 08:48:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTT6q-0007vB-Hj for guix-patches@gnu.org; Mon, 25 Dec 2017 08:48:07 -0500 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:35004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eTT6q-0007sr-8M for guix-patches@gnu.org; Mon, 25 Dec 2017 08:48:04 -0500 Received: by mail-lf0-x236.google.com with SMTP id j124so37655221lfg.2 for ; Mon, 25 Dec 2017 05:48:03 -0800 (PST) Received: from magnolia (95-55-124-157.dynamic.avangarddsl.ru. [95.55.124.157]) by smtp.gmail.com with ESMTPSA id u10sm5572480lju.25.2017.12.25.05.48.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Dec 2017 05:48:01 -0800 (PST) From: Oleg Pykhalov Date: Mon, 25 Dec 2017 16:46:21 +0300 Message-ID: <877etaq5si.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; 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: 29847@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello Guix, If pypi->guix-package fails to get a source release, could we return false instead of killing a running Guile REPL session? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-import-pypi-Stay-in-the-REPL-if-fail-to-get-a-source.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] import: pypi: Stay in the REPL if fail to get a source From=206bb461018fc4cd47d30ab27b5748b9e4cbce6e97 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Mon, 25 Dec 2017 16:32:14 +0300 Subject: [PATCH] import: pypi: Stay in the REPL if fail to get a source release. * guix/import/pypi.scm (pypi->guix-package): Return #f if no source release. =2D-- guix/import/pypi.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index bb0db1ba8..3f37ea65f 100644 =2D-- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -275,9 +275,11 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION,= and LICENSE." (and package (guard (c ((missing-source-error? c) (let ((package (missing-source-error-package c))) =2D (leave (G_ "no source release for pypi package ~a = ~a~%") =2D (assoc-ref* package "info" "name") =2D (assoc-ref* package "info" "version"))))) + (format (current-error-port) + (G_ "no source release for pypi package ~a ~= a~%") + (assoc-ref* package "info" "name") + (assoc-ref* package "info" "version")) + #f))) (let ((name (assoc-ref* package "info" "name")) (version (assoc-ref* package "info" "version")) (release (assoc-ref (latest-source-release package) "url"= )) =2D-=20 2.15.1 --=-=-= Content-Type: text/plain Thanks, Oleg. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlpBAS0ACgkQckbhHGm3 lWlmKw//cBNm743jW4QNz1bPNkkdDpNMIZAzyKnrpEK8G6RipWhM9WkWOkHtzNpN J+Hcm6IzrxXhyK/SoBCxvm8/LRX29bECb3+eD5f9nUebyEG7MDmqmgS+nQIO+5S7 ZSnIYuutEWgQsPzuFuzFKnO4z3marM7JNc7rfI1wmpOofVmLwqyNMdNi6hxmR/J3 ZQdDyd0iE92L85AfwMz8uVlYpAkdBKInosEG/klYaHoMu6MnTyL+YK3WwOCr+44X YhI+0RUFeVqdZIO/FXxBf/PsCX3CirfARuAjEjNs8BhL8UIPzGn2DYXkLmtVQ0bZ Cv4oKuGORbVd0go/FpA26oZDIMNSfKPlf6lal3xxFkPDuf9V15EHypqb3hSfhbjI uJ913q37YhIqmkXBL1vuW2Vd4VV/74drtk9j3RNKf+XPyfR/H2QUP9ohzNcjAqCc rilVdsPibOQzlM2HRRt/Lwm4eESmUQyc5+7pnXjOHqRWUnRXmMSOlEnu4wqvb6TA Ep59YJjURJjnchca6pzGrr52LsLKAMOi5Z6zsj6Ep9K4aTdYMm5H8epfkO+iNUTr 8220tm/sidRcLqrsNHJZjspsLgqE+XtBolYZxiSQ9kkLXtHsAnIVSnvv8B1psV+Y tGSYXfUtixw2IeRIWVrP69NzPKukaZX0VMryYwONHV9xNWqryq4= =LWqL -----END PGP SIGNATURE----- --==-=-=--