From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eTTIW-0000pr-B8 for guix-patches@gnu.org; Mon, 25 Dec 2017 09:00:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eTTIR-0007WN-CB for guix-patches@gnu.org; Mon, 25 Dec 2017 09:00:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:42548) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eTTIR-0007W1-8Z for guix-patches@gnu.org; Mon, 25 Dec 2017 09:00:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eTTIQ-0002Jw-Nl for guix-patches@gnu.org; Mon, 25 Dec 2017 09:00:02 -0500 Subject: [bug#29847] [PATCH] import: pypi: Stay in the REPL if fail to get a source Resent-Message-ID: Date: Mon, 25 Dec 2017 13:59:46 +0000 From: ng0 Message-ID: <20171225135946.qmwzqyovo7kjrkbg@abyayala> References: <877etaq5si.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6wy24msv42tpq3cy" Content-Disposition: inline In-Reply-To: <877etaq5si.fsf@gmail.com> 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: Oleg Pykhalov Cc: 29847@debbugs.gnu.org --6wy24msv42tpq3cy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Oleg Pykhalov transcribed 2.9K bytes: > Hello Guix, >=20 > If pypi->guix-package fails to get a source release, could we return > false instead of killing a running Guile REPL session? >=20 Why? Could you give some reasons why the current behavior is bad and what your code tries to improve in this regard? > From 6bb461018fc4cd47d30ab27b5748b9e4cbce6e97 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. >=20 > * guix/import/pypi.scm (pypi->guix-package): Return #f if no source relea= se. > --- > guix/import/pypi.scm | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) >=20 > diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm > index bb0db1ba8..3f37ea65f 100644 > --- a/guix/import/pypi.scm > +++ b/guix/import/pypi.scm > @@ -275,9 +275,11 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTIO= N, and LICENSE." > (and package > (guard (c ((missing-source-error? c) > (let ((package (missing-source-error-package c))) > - (leave (G_ "no source release for pypi package ~a = ~a~%") > - (assoc-ref* package "info" "name") > - (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) "ur= l")) > --=20 > 2.15.1 >=20 >=20 > Thanks, > Oleg. --=20 GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588 GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys WWW: https://n0.is --6wy24msv42tpq3cy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlpBBFEACgkQ4i+bv+40 hYggyhAAtYvg+hfevGlThC99MYbpvEH2IvZQnZNAmpHIhStS+olamgVzVntdFg2t OSuhaaYDg55Puirc2xqDE9vNxdkCyVO484gpXM6z39tMuFHnUdwZcZMcF8WvgYfZ 36vd5u/dVAGdTfGNuO0xY2RwqeJmv5wcJJG+3N/Apc71Do6zI387Bxx8tihtX6lw QX0yXRrJ2is6AyoAyzS+oEOo1PAyDV9Zdqsxo0X0Na0VDexs1B/MJuh008Tej+NJ MgmmO41BKB9N6CT13BsA9g+NUrzdTQZfD4g4rBO8gsi8eXbjBNa0/iiEJWrctfFE OwzVHhgCRatK6Qp7uLrVPFT2euze4PgyU+v+iJUXzIDpIbcLBE3LMyE6kbVZIgiZ WLn7+2RhrjF8gvr1HT6JkNVd57eKVUH84OOMNMUzajagdUVOi4gQvEPiNeVao6sq h1rwHZBFxlqSgxTtHhLBL5zbDSaEkiMpHO+lEAXTGz768PzYPxtZEUcr1NOE4NHZ uh9VMwtreMbTIT9OPCeVXPdWqYHuYRPcFQrggEzLVvk5CHEIw6//WmeLT8Ct2/Bx Nnk7+OJ+1eCenOcrf27sLdvoyRLlyBCzu2KOz6tgN25hgNphupmfRrg0EMnANA02 ZrfWtW8lJEQml7KCVzwEC/r+1xRpIdoPK5Iw/lOg5shiSYHpiiM= =Swtv -----END PGP SIGNATURE----- --6wy24msv42tpq3cy--