Commit Graph

10 Commits (ab6522aeb05b23a2bb32b10457cebd85ccb248fe)

Author SHA1 Message Date
Ludovic Courtès e66ca1a5a8 download: Report the progress of HTTP downloads.
* guix/build/download.scm (http-fetch): Rename `bv' to `bv-or-port'.
  Use `http-get*' followed by `dump-port' when the former is available,
  and pass a progress procedure to `dump-port'.
2013-01-06 18:36:50 +01:00
Ludovic Courtès e47bac7902 download: Report the progress of FTP downloads.
* guix/build/download.scm (progress-proc): New procedure.
  (ftp-fetch): Call `ftp-size' on URI.  Use `progress-proc', and pass
  the result to `dump-port', along with #:buffer-size.
2013-01-06 18:35:23 +01:00
Ludovic Courtès 4050e5d6cf Merge branch 'master' into core-updates
Conflicts:
	build-aux/download.scm
	distro/packages/autotools.scm
	distro/packages/base.scm
	distro/packages/bootstrap.scm
	distro/packages/lsh.scm
	distro/packages/make-bootstrap.scm
	distro/packages/ncurses.scm
	distro/packages/perl.scm
	tests/derivations.scm
	tests/union.scm
2013-01-06 17:33:02 +01:00
Ludovic Courtès 4155e2a909 Update license headers of builder-side code.
Change license headers with this script:

  (use-modules (guix build utils))

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

  (substitute* (cons "distro/packages/ld-wrapper.scm"
		     (find-files "guix/build" "\\.scm$"))
    (("^([[: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 ©")))

* distro/packages/ld-wrapper.scm, guix/build/download.scm,
  guix/build/gnu-build-system.scm, guix/build/union.scm,
  guix/build/utils.scm: Update license headers.
2013-01-05 16:08:07 +01:00
Ludovic Courtès 3c738d6bd8 download: Correctly detect "No route to host" conditions.
* guix/build/download.scm (open-connection-for-uri): Delete addrinfos
  with the same address.  Always open SOCK_STREAM/IPPROTO_IP sockets.
  Fix the error handler's condition to determine what to do.
  Reported by Nikita Karetnikov <nikita.karetnikov@gmail.com> at
  <http://lists.gnu.org/archive/html/bug-guix/2012-12/msg00150.html>.
2012-12-17 00:14:30 +01:00
Ludovic Courtès b3a53fb361 download: Work around (web client) bug <http://bugs.gnu.org/13095>.
* guix/build/download.scm: Annihilate `shutdown' in (web client).
2012-12-14 18:07:10 +01:00
Ludovic Courtès 480943dd46 download: Keep only one slash when concatenating URIs.
* guix/build/download.scm (url-fetch)[uri-vicinity]: New procedure.
  [maybe-expand-mirrors]: Use it.
2012-11-27 21:33:54 +01:00
Ludovic Courtès 94d222ad97 download: Add support for mirror:// URLs.
* guix/download.scm (%mirrors): New variable.  Mirror lists taken from
  Nixpkgs.
  (url-fetch): New `mirrors' keyword parameter.
  [builder]: Pass it.

* guix/build/download.scm (url-fetch): New `mirrors' keyword parameter.
  [maybe-expand-mirrors]: New procedure.
  [uri]: Use it.
2012-11-13 00:23:43 +01:00
Ludovic Courtès 270246defe download: Follow HTTP redirections.
* guix/build/download.scm (http-fetch): Follow the redirection when CODE
  is 302.
2012-11-13 00:23:43 +01:00
Ludovic Courtès 62cab99c32 Add (guix download) and (guix build download).
* guix/download.scm, guix/build/download.scm: New files.
* Makefile.am (MODULES): Add them.
* tests/builders.scm ("url-fetch"): New test.
* distro/packages/bootstrap.scm (bootstrap-origin): Support
  `url-fetch'.
* guix/snix.scm (snix-derivation->guix-package): Use `url-fetch' instead
  of `http-fetch'.
2012-11-12 23:35:04 +01:00