all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18831: Error handling in guix import?
@ 2014-10-25  9:19 Ian Denhardt
  2014-11-05 17:06 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Denhardt @ 2014-10-25  9:19 UTC (permalink / raw)
  To: 18831

[-- Attachment #1: Type: text/plain, Size: 2269 bytes --]

So I was trying to play with the pypi importer, and (as a test) ran:

    guix import pypi schema

and got back:

    starting download of `/tmp/guix-file.5J1eOy' from `https://pypi.python.org/pypi/schema/json'...
    ;;; Failed to autoload make-session in (gnutls):
    ;;; ERROR: missing interface for module (gnutls)
    ERROR: In procedure module-lookup: Unbound variable: make-session
    failed to download "/tmp/guix-file.5J1eOy" from "https://pypi.python.org/pypi/schema/json"
    Backtrace:
    In ice-9/boot-9.scm:
     157: 13 [catch #t #<catch-closure 28ab1c0> ...]
    In unknown file:
       ?: 12 [apply-smob/1 #<catch-closure 28ab1c0>]
    In ice-9/boot-9.scm:
      63: 11 [call-with-prompt prompt0 ...]
    In ice-9/eval.scm:
     432: 10 [eval # #]
    In ice-9/boot-9.scm:
    2401: 9 [save-module-excursion #<procedure 28ca940 at ice-9/boot-9.scm:4045:3 ()>]
    4050: 8 [#<procedure 28ca940 at ice-9/boot-9.scm:4045:3 ()>]
    1724: 7 [%start-stack load-stack ...]
    1729: 6 [#<procedure 28e2ea0 ()>]
    In unknown file:
       ?: 5 [primitive-load "/home/isd/src/guix/scripts/guix"]
    In guix/ui.scm:
     776: 4 [run-guix-command import "pypi" "schema"]
    In guix/scripts/import.scm:
     109: 3 [guix-import "pypi" "schema"]
    In guix/import/pypi.scm:
     167: 2 [pypi->guix-package "schema"]
     112: 1 [latest-source-release #f]
    In unknown file:
       ?: 0 [find #<procedure 3b00920 at guix/import/pypi.scm:112:14 (release)> #f]
    
    ERROR: In procedure find:
    ERROR: In procedure find: Wrong type argument in position 2 (expecting list): #f


It's obvious from the stuff at the beginning that there's some
underlying issue to due with gnutls that's causing the url fetch to
fail. My hunch is that's just my system, However, it's perfectly
reasonable to expect it to fail under more normal circumstances -
e.g. you're not connected to a network.

I poked through the source a bit, and it looks like the importer is just
not checking for errors from (guix build download)'s url-fetch (which
returns #f on error), so when it fails you get a stack trace like the
above. We should do a proper check for download failures, and print an
intelligible error message.

-Ian

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABAgAGBQJUS2sVAAoJEPZUuMfUyjy47w8QALFor8O29yi0tAiXx+E0KnA9
MzMgrTD/JUjyzS8wvJihBQVygtQVjqO4DvjJVM6nAw8UUzpDZHmCgMsztm+voorj
BOTGdk8kXoZ4eHzdpDRyO8dmQF+x2V+fKT/wfYTCHZ9u2G7IzajzUJ+vM3Rlmb5G
/1FknaVxNaRdLY5LfWZsDDF3YFRbZXYzL7Qf0FFRWnO4Bgr32djDq+qrFRhEVCOw
Q08na88qz7I7HZVglR7I/qV89Cjq/bJ/uYFIhjT/Fx68dMV3DEOUTbaJMEJuokq6
jUvLombfAo3IJCmsaOZn5YqOT13EpjV8RXOFrrCDTiUrcCcMLMKKvbX3BkFuXkl2
Y5syPaT7EQt8biofBvdxHDeRhvnRxd+7i1vWjV99BhvkzdypAqfsg5HHbV9W/5Ly
D1Or+K9IhxqEkgF1fB/5nlDAZH0w381OvbM3HXkFeB5hsYmvdUH5onjYeHSPdubL
YpAz9Zaj9dPqS28042wqULR+Z1QCPVZVgj1qCjBeD1rqo+VtnM9RykjxiUJhVpu7
AGEMgcQLRVTGFggC6xJ+Oa+/SWH2JnJnuUyeF2u3f2icDlrtUwMRfQeynUl6L2xV
+VX6RvM97mggw7C614isg2sbjtQPNp4Naw0iCVTk7gBjNYj+OD1nQz5s88LVY1W+
sEoVgzjl5NVPjlFFCIqD
=51pm
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#18831: Error handling in guix import?
  2014-10-25  9:19 bug#18831: Error handling in guix import? Ian Denhardt
@ 2014-11-05 17:06 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-11-05 17:06 UTC (permalink / raw)
  To: Ian Denhardt; +Cc: 18831-done

Thanks for the report and analysis.  This is fixed in 467a3c9.

Ian Denhardt <ian@zenhack.net> skribis:

>     starting download of `/tmp/guix-file.5J1eOy' from `https://pypi.python.org/pypi/schema/json'...
>     ;;; Failed to autoload make-session in (gnutls):
>     ;;; ERROR: missing interface for module (gnutls)
>     ERROR: In procedure module-lookup: Unbound variable: make-session

As for this part, note that GnuTLS is actually required here, because
pypi.python.org is only accessibly over HTTPS here.  We’ll make that
clear in the manual.

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-05 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-25  9:19 bug#18831: Error handling in guix import? Ian Denhardt
2014-11-05 17:06 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.