~ruther/guix-local

ref: c00a9fbfef75d2fc08485f8158ec331bfa99d5ec guix-local/guix/utils.scm -rw-r--r-- 25.4 KiB
33690ffd — Mark H Weaver 11 years ago
Merge branch 'master' into core-updates
516e3b6f — Eric Bavier 11 years ago
guix: utils: Add fold-tree and fold-tree-leaves.

* guix/utils.scm (fold-tree, fold-tree-leaves): New functions.
* tests/utils.scm: Add tests for them.
af018f5e — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
29fa45f4 — Ludovic Courtès 12 years ago
Add (guix build syscalls).

* guix/build/syscalls.scm, tests/syscalls.scm: New files.
* Makefile.am (MODULES): Add guix/build/syscalls.scm.
  (SCM_TESTS): Add tests/syscalls.scm.
* guix/utils.scm (%libc-errno-pointer, errno): Remove; take from (guix
  build syscalls).
30ce8012 — Ludovic Courtès 12 years ago
offload: '{send,receive}-files' wait for completion of the transfer.

Fixes situations where the remote 'guix build' is invoked before the
.drv has been completely copied, as reported at
<https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00174.html>.

In some cases 'send-files' would return before the other end is done
importing the files, and so the subsequent 'guix build' invocation would
just miss the .drv file it refers to.

* guix/utils.scm (call-with-decompressed-port): Don't close PORT.
  (call-with-compressed-output-port): Likewise.
* tests/utils.scm ("compressed-output-port + decompressed-port"): Adjust
  accordingly.
* guix/scripts/offload.scm (send-files): Add explicit (close-pipe pipe)
  call.
  (retrieve-files): Likewise.
af4535c5 — Ludovic Courtès 12 years ago
utils: Make 'errno' procedure more robust.

Partially fixes <http://bugs.gnu.org/17212>.

* guix/utils.scm (errno): Move definition of 'bv' outside of the
  procedure.  Use 'bytevector-s32-native-ref' or
  'bytevector-s64-native-ref' instead of 'bytevector-sint-ref'.
01ac19dc — Ludovic Courtès 12 years ago
utils: Add 'call-with-decompressed-port' and 'call-with-compressed-output-port'.

* guix/utils.scm (call-with-decompressed-port,
  call-with-compressed-output-port): New procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"):
  Rewrite to use them.
80dea563 — Ludovic Courtès 12 years ago
utils: Add 'filtered-output-port' and 'compressed-output-port'.

* guix/utils.scm (filtered-output-port, compressed-output-port): New
  procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"): New
  test.
7a8024a3 — Ludovic Courtès 12 years ago
utils: Add 'decompressed-port' and 'compressed-port'.

* guix/utils.scm (decompressed-port, compressed-port): New procedures.
* guix/scripts/substitute-binary.scm (decompressed-port): Remove.
  (guix-substitute-binary): Pass a symbol or #f as the first argument to
  'decompress-port'.
* tests/utils.scm ("compressed-port, decompressed-port, non-file"): New
  test.
443eb4e9 — Ludovic Courtès 12 years ago
utils: 'filtered-port' doesn't leave dangling processes behind.

* guix/utils.scm (filtered-port): Make sure the 'execl' child process
  always exits, and does (primitive-_exit 1) upon execution failure.
  Use 'primitive-_exit' in the 'dump-port' child process.
* tests/utils.scm ("filtered-port, does not exist"): New test.
e06f7865 — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates
c7445833 — Ludovic Courtès 12 years ago
utils: Add a non-blocking option for 'fcntl-flock'.

* guix/utils.scm (F_SETLK): New variable.
  (fcntl-flock): Add 'wait?' keyword parameter; honor it.
* tests/utils.scm ("fcntl-flock non-blocking"): New test.
9ea3ef26 — Ludovic Courtès 12 years ago
utils: 'fcntl-flock' passes an errno when throwing an exception.

* guix/utils.scm (%libc-errno-pointer, errno): New procedures.
  (fcntl-flock): Use it as the exception's argument.
200a97e6 — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates
2cd5c038 — Ludovic Courtès 12 years ago
utils: Add 'fcntl-flock'.

* guix/utils.scm (%struct-flock, F_SETLKW, F_xxLCK): New variables.
  (fcntl-flock): New procedure.
* tests/utils.scm ("fcntl-flock"): New test.
2f265602 — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates
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.
edae5b3d — Ludovic Courtès 12 years ago
Merge branch 'master' into core-updates

Conflicts:
	guix/packages.scm
56b943de — Ludovic Courtès 12 years ago
utils: Add 'string-replace-substring'.

* guix/utils.scm (string-replace-substring): New procedure.  Based on
  code by Mark H. Weaver.
* tests/utils.scm ("string-replace-substring"): New test.
ac10e0e1 — Ludovic Courtès 12 years ago
packages: Add 'patches' and related fields to <origin>.

See <https://lists.gnu.org/archive/html/guix-devel/2013-09/msg00137.html>
for the rationale.

* guix/packages.scm (<origin>)[patches, patch-flags, patch-inputs,
  patch-guile]: New fields.
  (%standard-patch-inputs, default-guile, patch-and-repack): New
  procedures.
  (package-source-derivation): When 'patches' is non-empty, call
  'patch-and-repack'.
* guix/utils.scm (file-sans-extension): New procedure.
Next