Commit Graph

10 Commits

Author SHA1 Message Date
Ludovic Courtès 820a40327d ftp-client: Throw when log-in fails.
* guix/ftp-client.scm (ftp-open): When '%ftp-listen' returns something
  different from 220, throw instead of writing an error message.
2015-05-20 12:13:39 +02:00
Ludovic Courtès 2a31e1dade ftp-client: Switch to binary mode before using the "SIZE" command.
* guix/ftp-client.scm (ftp-size): Add '%ftp-command' call.
2015-03-19 13:00:21 +01:00
Ludovic Courtès 3c986b75f5 ftp-client: Add missing CR in "USER" command.
* guix/ftp-client.scm (%ftp-login): Add #\return before #\newline.
  Fixes access to some FTP servers, such as
  ftp://invisible-island.net ("ProFTPD 1.3.4a Server").
2014-05-03 00:46:51 +02:00
Ludovic Courtès 91fe0e20c7 ftp-client: Let callers handle `ftp-open' exceptions.
* guix/ftp-client.scm (ftp-open): Let exceptions through.
* guix/scripts/package.scm (waiting): Wrap EXP in a `dynamic-wind', so
  the line is always cleared.
2013-05-14 23:51:36 +02:00
Ludovic Courtès 87dfd45594 ftp-client: `ftp-chdir' changes one step at a time.
* guix/ftp-client.scm (%char-set:not-slash): New variable.
  (ftp-chdir): Add docstring.  Change to DIR one step at a time.
  (ftp-retr): Fix indentation.
2013-04-27 16:25:54 +02:00
Ludovic Courtès fb83842efb ftp-client: Add `ftp-size'.
* guix/ftp-client.scm (ftp-size): New procedure.
2013-01-06 18:23:44 +01:00
Ludovic Courtès 233e76769a Update license headers.
Change all license headers, except guix/build/* and ld-wrapper.scm, with
this code:

  (use-modules (guix build utils)
	       (srfi srfi-1))

  (fluid-set! %default-port-encoding "UTF-8")

  (substitute* (remove (lambda (f)
			 (or (string-contains f ".tar.")
			     (string-contains f ".git/")
			     (string-contains f ".so")
			     (string-suffix? ".o" f)
			     (string-suffix? ".a" f)
			     (string-suffix? ".go" f)
			     (string-suffix? ".pdf" f)
			     (string-suffix? ".png" f)
			     (string-suffix? ".info" f)
			     (equal? (basename f) "guix-daemon")
			     (equal? (basename f) "nix-setuid-helper")
			     (string-contains f "nix-upstream/")
			     (string-contains f "distro/packages/bootstrap/")))
		       (find-files "." "\\.[a-z]+$"))
    (("^([[:graph:]]+) This file is part of Guix." _ comment-start)
     (string-append comment-start " This file is part of GNU Guix."))
    (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
     (string-append comment-start
		    " GNU Guix --- Functional package management for GNU\n"))
    (("^([[:graph:]]+) Guix is " _ comment-start)
     (string-append comment-start " GNU Guix is "))
    (("^([[:graph:]]+) along with Guix." _ comment-start)
     (string-append comment-start " along with GNU Guix."))
    (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
     (string-append comment-start " Copyright ©")))

Change headers using C-style comments manually.
2013-01-06 00:47:50 +01:00
Ludovic Courtès d14ecda913 http/ftp: Tweak to avoid depending on libc's NSS.
* guix/build/http.scm (open-connection-for-uri): New procedure.
  (http-fetch): Use it.  Pass the result as a #:port argument to
  `http-get'.
  Add hack to modify the `set-port-encoding!' binding in (web response).

* guix/ftp-client.scm (ftp-open): Add optional `port' parameter,
  defaulting to 21.  When calling `getaddrinfo', convert PORT to a
  string and pass AI_NUMERICSERV when PORT is a number.
2012-10-18 22:32:23 +02:00
Ludovic Courtès 4004f95379 ftp-client: Try all the addresses returned by `getaddrinfo'.
* guix/ftp-client.scm (ftp-open): Upon connection failure, try the other
  addresses returned by `getaddrinfo'.
2012-10-13 21:18:16 +02:00
Ludovic Courtès 457dd86d66 Add (guix ftp) and companion modules.
* guix/ftp-client.scm, guix/ftp.scm, guix/build/ftp.scm: New files.
* Makefile.am (MODULES): Add them.

* distro/base.scm (libffi): Use `ftp-fetch'.
2012-09-12 23:47:49 +02:00