~ruther/guix-local

ref: 04d4c8a439c035cf41296eafc23a5dfe196c24db guix-local/guix/scripts/substitute-binary.scm -rwxr-xr-x 22.7 KiB
04d4c8a4 — Ludovic Courtès 12 years ago
Move 'with-atomic-file-output' to (guix utils).

* guix/scripts/substitute-binary.scm (with-atomic-file-output): Move to...
* guix/utils.scm (with-atomic-file-output): ... here.
de679269 — Ludovic Courtès 12 years ago
substitute-binary: Work around Guile 2.0.5's broken 'n-par-map'.

* guix/scripts/substitute-binary.scm (n-par-map*): New procedure.
  (guix-substitute-binary): Use it instead of 'n-par-map'.
  Reported by Nikita Karetnikov and Eric Bavier.
edae5b3d — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates

Conflicts:
	guix/packages.scm
c509bf8c — Ludovic Courtès 12 years ago
substitute-binary: Adjust timeout handling for Guile > 2.0.9.

* guix/scripts/substitute-binary.scm (with-timeout): Update comment to
  mention the fix's commit ID.
  (fetch): In the 'with-timeout' handler, close PORT only one Guile
  versions < 2.0.9.39.  Before that, on Guile >= 2.0.9.39, the HTTP
  client would end up trying to read from a closed file descriptor.
50dc4892 — Ludovic Courtès 12 years ago
substitute-binary: Increase lookup concurrency to reduce latency.

* guix/scripts/substitute-binary.scm (%lookup-threads): New variable.
  (guix-substitute-binary): Use 'n-par-map' instead of 'par-map' for
  batch 'lookup-narinfo' calls.
5608847c — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates
29479de5 — Ludovic Courtès 12 years ago
substitute-binary: Add '--help'.

Reported by Nikita Karetnikov <nikita@karetnikov.org>.

* guix/scripts/substitute-binary.scm (show-help): New procedure.
  (guix-substitute-binary): Add '--help'.
8ce3104e — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates
00554b2a — Ludovic Courtès 12 years ago
substitute-binary: Show the Nar size, when available.

* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--substitute"]:
  Show the Nar size, when available.
* guix/ui.scm (show-what-to-build): Add 'TODO'.
7db3ff4a — Ludovic Courtès 12 years ago
utils: Add `guile-version>?', and use it.

This fixes Guile version comparisons when (version) has a
vendor-specific suffix.

Reported by Andreas Enge <andreas@enge.fr>.

* guix/utils.scm (guile-version>?): New procedure.
* tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New
  tests.
* guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use
  `guile-version>?' instead of `version>?'.
* guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise.
b6952cad — Ludovic Courtès 12 years ago
substitute-binary: Try hard to avoid port buffering.

* guix/scripts/substitute-binary.scm (fetch): In the `file' case, open
  with the `b' flag, so that the coding cookie reading thing doesn't
  lead to buffering some of the data (on 2.0.5).
* tests/utils.scm ("filtered-port, file"): Open with `r0b'.  Fixes a
  test failure with Guile 2.0.5 whereby the first byte of FILE would be
  missing from DECOMPRESSED.
db90b40d — Ludovic Courtès 12 years ago
substitute-binary: Don't pretend to report download progress on Guile 2.0.5.

* guix/scripts/substitute-binary.scm (progress-report-port): On Guile
  2.0.5, return PORT directly and emit a warning.
3b8258c5 — Ludovic Courtès 12 years ago
Rename (guix web) to (guix http-client).

* guix/web.scm: Rename to...
* guix/http-client.scm: ... this.
* guix/gnu-maintenance.scm, guix/scripts/substitute-binary.scm,
  Makefile.am, po/POTFILES.in: Update accordingly.
ce689ccf — Ludovic Courtès 12 years ago
substitute-binary: Directly replace the global `regexp-exec'.

* guix/scripts/substitute-binary.scm (%regexp-exec-mutex, string->uri):
  Remove.
  (regexp-exec): Replace this global binding by a thread-safety wrapper.
  (fields->alist): Remove `with-mutex', and directly alias `recutils->alist'.
8b79e2e6 — Ludovic Courtès 12 years ago
substitute-binary: Increase the default timeout.

* guix/scripts/substitute-binary.scm (%fetch-timeout): Set to 5 seconds.
fdc1bf65 — Ludovic Courtès 12 years ago
records: Add `recutils->alist' for public consumption.

* guix/records.scm (%recutils-field-rx): New variable.
  (recutils->alist): New procedure, formerly known as `fields->alist'.
* guix/scripts/substitute-binary.scm (fields->alist): Use it.
* tests/records.scm ("recutils->alist"): New test.
bb7dcaea — Ludovic Courtès 12 years ago
substitute-binary: Avoid dangling connections to the server.

* guix/web.scm (open-socket-for-uri): New procedure.
  (http-fetch): Add `port' keyword parameter; use it.
* guix/scripts/substitute-binary.scm (%random-state): New variable.
  (with-timeout): Wait a little before retrying.
  (fetch): Use `open-socket-for-uri', and keep a copy of the socket in
  variable `port'.  Close PORT upon timeout.
d501fad1 — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates

Conflicts:
	gnu/packages/make-bootstrap.scm
a85060ef — Ludovic Courtès 12 years ago
substitute-binary: Report progress while downloading.

* guix/scripts/substitute-binary.scm (decompressed-port): Improve docstring.
  (progress-report-port): New procedure.
  (guix-substitute-binary)["--substitute"]: Use it to report progress.
* guix/build/download.scm: Export `progress-proc' and `uri-abbreviation'.
2207f731 — Ludovic Courtès 12 years ago
substitute-binary: Provide feedback when the server is unresponsive.

* guix/scripts/substitute-binary.scm (%fetch-timeout): New variable.
  (with-timeout): New macro.
  (fetch): Add `timeout?' keyword parameter.  Enclose `http-fetch' call
  in `with-timeout'.
  (guix-substitute-binary): Call `fetch' with #:timeout? #f.
Next