~ruther/guix-local

ref: bfda2997c8d4f0ac14f1bd54f87cd320039cfd3d guix-local/guix/scripts d---------
bfda2997 — Nikita Karetnikov 13 years ago
guix download: Add supported formats to '--help'.

* guix/scripts/download.scm (show-help): Add supported formats.
98eb8cbe — Nikita Karetnikov 13 years ago
ui: Add a 'define-diagnostic' macro.

* guix/ui.scm (define-diagnostic): New macro, which is based on the
  previous version of 'warning'.
  (warning, leave): Redefine using 'define-diagnostic'.
  (report-error): New macro.
  (install-locale): Use 'warning' instead of 'format'.
  (call-with-error-handling): Adjust 'leave'.
* gnu/packages.scm (package-files): Use 'warning' instead of 'format'.
* guix/gnu-maintenance.scm (http-fetch): Use 'warning' and 'leave'.
* guix/scripts/build.scm (derivations-from-package-expressions, guix-build):
  Adjust 'leave'.
* guix/scripts/download.scm (guix-download): Adjust 'leave'.
* guix/scripts/gc.scm (size->number, %options): Adjust 'leave'.
* guix/scripts/package.scm (roll-back, guix-package): Adjust 'leave'.
* po/POTFILES.in: Add 'guix/gnu-maintenance.scm'.
4c7cacf1 — Ludovic Courtès 13 years ago
substitute-binary: Remove expired cache entries once in a while.

* guix/scripts/substitute-binary.scm (%narinfo-expired-cache-entry-removal-delay):
  New variable.
  (obsolete?): New procedure, formerly in `lookup-narinfo'.
  (lookup-narinfo): Adjust accordingly.
  (remove-expired-cached-narinfos, maybe-remove-expired-cached-narinfo):
  New procedures.
  (guix-substitute-binary): Call `maybe-remove-expired-cached-narinfo'.
b52cb20d — Ludovic Courtès 13 years ago
guix package: Allow the search of the latest release to be interrupted.

* guix/scripts/package.scm (%sigint-prompt): New variable.
  (call-with-sigint-handler): New procedure.
  (waiting): Use it.
dd36b51b — Ludovic Courtès 13 years ago
scripts: Report what will be substituted.

* guix/derivations.scm (derivation-input-output-paths): New procedure.
  (derivation-prerequisites-to-build): New `use-substitutes?' keyword
  argument.  Change two return the list of substitutable paths as a
  second argument.
* guix/ui.scm (show-what-to-build): Turn `dry-run?' into a keyword
  argument.  New `use-substitutes?' keyword argument.  Use `fold2' and
  adjust to use both return values of
  `derivation-prerequisites-to-build'.  Display what will/would be
  downloaded.
* guix/scripts/build.scm (guix-build): Adjust accordingly.
* guix/scripts/package.scm (guix-package): Likewise.
* tests/derivations.scm ("derivation-prerequisites-to-build and
  substitutes"): New test.
acb6ba25 — Cyril Roelandt 13 years ago
package: allow users to upgrade the whole system by not providing a regexp.

* guix/scripts/packages.scm (guix-package) [process-actions]: When upgrading,
use "" when REGEXP is #f.
* doc/guix.texi: update the documentation accordingly.
e967678e — Ludovic Courtès 13 years ago
substitute-binary: Skip servers that use a different store prefix.

* guix/scripts/substitute-binary.scm (fetch-narinfo): Return #f when
  CACHE uses a store directory different from (%store-prefix).
0c357a08 — Ludovic Courtès 13 years ago
substitute-binary: Call `open-cache' only when needed.

* guix/scripts/substitute-binary.scm (lookup-narinfo): Force CACHE when
  passing it to `fetch-narinfo'.
  (guix-substitute-binary): Delay calls to `open-cache'.
eba783b7 — Ludovic Courtès 13 years ago
substitute-binary: Add a local cache.

* guix/scripts/substitute-binary.scm (%narinfo-cache-directory,
  %narinfo-ttl, %narinfo-negative-ttl): New variables.
  (with-atomic-file-output, object->fields, read-narinfo,
  write-narinfo, narinfo->string, string->narinfo, lookup-narinfo): New
  procedures.
  (fetch-narinfo): Adjust to use `read-narinfo'.
  (guix-substitute-binary): Ensure the existence of
  %NARINFO-CACHE-DIRECTORY.  Use `lookup-narinfo' instead of
  `fetch-narinfo'.
c31d1a78 — Ludovic Courtès 13 years ago
package: Being at the empty profile is not an error.

* guix/scripts/package.scm (roll-back): Use `format', not `leave' when
  indicating "already at the empty profile".  Fixes a regression
  introduced in a2011be5dfaf2b94a1d0e3dfbcf4b512389b4711.  Reported by
  Nikita Karetnikov <nikita@karetnikov.org>.
3b824605 — Ludovic Courtès 13 years ago
guix package: Add `--no-substitutes'.

* guix/scripts/package.scm (%default-options): Add `substitutes?'.
  (show-help, %options): Add and document `--no-substitutes'.
  (guix-package): Call `set-build-options' to honor `substitutes?'.
fe0cff14 — Ludovic Courtès 13 years ago
substitute-binary: Implement `--substitute'.

This allows build outputs to be transparently downloaded from
http://hydra.gnu.org, for example.

* config-daemon.ac: Check for `gzip', `bzip2', and `xz'.
* guix/config.scm.in (%gzip, %bzip2, %xz): New variable.
* guix/scripts/substitute-binary.scm (fetch): Return SIZE as a second value.
  (<narinfo>): Change `url' to `uri'.
  (make-narinfo): Rename to...
  (narinfo-maker): ... this.  Handle relative URLs.
  (fetch-narinfo): Adjust accordingly.
  (filtered-port, decompressed-port): New procedures.
  (guix-substitute-binary): Implement the `--substitute' case.
* tests/store.scm ("substitute query"): Use (%store-prefix) instead
  of (getenv "NIX_STORE_DIR").
  ("substitute"): New test.
d7c5d277 — Ludovic Courtès 13 years ago
substitute-binary: Correctly handle missing narinfos in `--query' mode.

* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--query"]("have",
  "info"): Filter SUBSTITUTABLE through `narinfo?'.
a2011be5 — Ludovic Courtès 13 years ago
ui: Add a `warning' macro.

* guix/ui.scm (program-name, guix-warning-port): New variables.
  (warning): New macro.
  (guix-main): Parametrize PROGRAM-NAME.
* guix/scripts/build.scm, guix/scripts/download.scm,
  guix/scripts/gc.scm, guix/scripts/package.scm: Adjust to use `leave'
  and `warning' consistently.
462f8e9f — Ludovic Courtès 13 years ago
substitute-binary: Fix communication of several store paths to the daemon.

* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--query"]:
  Emit blank lines only after the complete list of store paths has been
  returned.
f65cf81a — Ludovic Courtès 13 years ago
Add preliminary binary substituter.

* guix/scripts/substitute-binary.scm: New file.
* Makefile.am (MODULES): Add it.
* nix/scripts/substitute-binary.in: New file.
* config-daemon.ac: Produce nix/scripts/substitute-binary.
* daemon.am (nodist_pkglibexec_SCRIPTS): Add
  nix/scripts/substitute-binary.
* guix/store.scm (substitutable-path-info): Use the
  `query-substitutable-path-infos' RPC.
* nix/nix-daemon/guix-daemon.cc (main): Honor `NIX_SUBSTITUTERS'.
* pre-inst-env.in: Set `NIX_SUBSTITUTERS'.
* test-env.in: Leave `NIX_SUBSTITUTERS' unchanged.  Set
  `GUIX_BINARY_SUBSTITUTE_URL, and create
  $NIX_STATE_DIR/substituter-data.
  Run `guix-daemon' within `./pre-inst-env'.
* tests/store.scm ("substitute query"): New test.
fdfd3d5d — Ludovic Courtès 13 years ago
pull: Switch to the cgit URL.

* guix/scripts/pull.scm (%snapshot-url): Switch to the cgit URL, given
  that the Hydra one is not currently available.
a4f08f92 — Ludovic Courtès 13 years ago
guix package: Report packages to be removed/installed.

* guix/scripts/package.scm (guix-package)[process-actions](show-what-to-remove/install):
  New procedure.
  Call it before `show-what-to-build'.
993fb66d — Ludovic Courtès 13 years ago
guix package: Gracefully handle `official-gnu-packages' failure.

* guix/gnu-maintenance.scm (http-fetch): Error out when DATA is #f.
* guix/scripts/package.scm (check-package-freshness): Wrap
  `gnu-package?' call in `false-if-exception'.
  Reported by Cyril Roelandt <tipecaml@gmail.com>.
ef86c39f — Ludovic Courtès 13 years ago
ui: Gracefully report failures to connect to the daemon.

* guix/store.scm (&nix-connection-error): New condition type.
  (open-connection): Translate `system-error' during the `connect' call
  into `&nix-connection-error'.
* guix/ui.scm (call-with-error-handling): Add case for `nix-connection-error?'.
* guix/scripts/package.scm (guix-package): Move `open-connection' call
  within `with-error-handling'.
* guix/scripts/pull.scm (guix-pull): Likewise.
* guix/scripts/download.scm (guix-download): Move body within
  `with-error-handling'.
Next