~ruther/guix-local

ref: d3c827e41908f98f2ebb9db4050f2bf7051715e2 guix-local/guix/scripts d---------
cc3de1da — Ludovic Courtès 10 years ago
guix package: Reduce startup time by ~50%.

As measured with:

  time sh -c 'for i in `seq 1 10` ; do guix package --search-paths ; done'

On my machine, when running:

  strace -o ,,s guix package --search-paths

the number returned by:

  grep -E '^(open|l?stat).*\.go' ,,s | wc -l

drops from 1610 to 837.

* guix/scripts/package.scm: Remove two unnecessary #:use-module forms.
Autoload (gnu packages ...) modules.
38b92daa — Ludovic Courtès 10 years ago
graph: Add '%bag-with-origins-node-type'.

* guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call.  Add
case for 'origin'.
(%bag-node-type)[edges]: Add filtering here.
(%bag-with-origins-node-type): New variable.
(%node-types): Add it.
* tests/graph.scm ("bag DAG, including origins"): New test.
* tests/guix-graph.sh: Add 'bag-with-origins'.
* doc/guix.texi (Invoking guix graph): Document it.
2d7fc7da — Ludovic Courtès 10 years ago
refresh: Add '--expression'.

* guix/scripts/refresh.scm (%options, show-help): Add --expression.
(guix-refresh): Honor it.
* doc/guix.texi (Invoking guix refresh): Document it.
86cdfc45 — Ludovic Courtès 10 years ago
guix download: Fail when more than one URL is passed.

* guix/scripts/download.scm (guix-download)[parse-option]: Call 'leave'
when passed an extra argument.
* tests/guix-download.sh: Add test.
71ae18ee — Ludovic Courtès 10 years ago
guix download: Gracefully handle missing arguments.

Fixes <http://bugs.gnu.org/21991>.
Reported by Jan Synáček <jan.synacek@gmail.com>.

* guix/scripts/download.scm (guix-download): Call 'leave' when OPTS does
not contain an 'argument' key.
862d2479 — Ludovic Courtès 10 years ago
ftp-client: Default port for 'ftp-open' is now "ftp".

* guix/ftp-client.scm (ftp-open): Change default #:port to "ftp".
* guix/scripts/lint.scm (probe-uri): Remove 'port' parameter to
'ftp-open'.
82e64fc1 — Ludovic Courtès 10 years ago
environment: Correctly handle abnormal exits.

Fixes <http://bugs.gnu.org/21958>.

* guix/scripts/environment.scm (status->exit-code): New procedure.
(exit/status, primitive-exit/status): Use it.
* tests/guix-environment-container.sh: Add test.
a51cbecb — Ludovic Courtès 10 years ago
refresh: Rewrite '--list-dependent' in terms of (guix graph).

* guix/scripts/refresh.scm (all-packages, list-dependents): New
procedures.
(guix-refresh): Use it.
8fb58371 — Ludovic Courtès 10 years ago
Add (guix graph).

* guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue)
(emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph):
Move to...
* guix/graph.scm: ... here.  New file.
* guix/scripts/system.scm, tests/graph.scm: Use it.
* Makefile.am (MODULES): Add it.
bd7e1ffa — Ludovic Courtès 10 years ago
lint: Have connections time out after 3 seconds.

* guix/scripts/lint.scm (probe-uri): Add #:timeout parameter.  Pass it
  to 'open-connection-for-uri' and 'ftp-open'.
  (validate-uri): Pass #:timeout 3 to 'probe-uri'.
3a96d7c3 — Ludovic Courtès 10 years ago
guix gc: Error out when extra arguments are passed.

Fixes <http://bugs.gnu.org/21817>.
Reported by Petter Berntsen <petter@mykolab.ch>.

* guix/scripts/gc.scm (guix-gc)[assert-no-extra-arguments]: New
  procedure.
  Use it for actions 'collect-garbage', 'optimize', and 'verify'.
* tests/guix-gc.sh: Add tests.
6237b9fa — Ludovic Courtès 10 years ago
edit: Honor $VISUAL.

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

* guix/scripts/edit.scm (%editor): Honor 'VISUAL' before 'EDITOR'.
  (show-help): Adjust accordingly.
* doc/guix.texi (Invoking guix edit): Likewise.
14649b8c — Ludovic Courtès 10 years ago
refresh: Avoid non-literal format string.

Reported by Mathieu Lirzin <mthl@gnu.org>.

* guix/scripts/refresh.scm (guix-refresh): Rewrite 'list-dependent?'
  report to avoid nested 'N_' calls.
fc2d2339 — Ludovic Courtès 10 years ago
guix package: '--search-paths' can report combined search paths.

Partly fixes <http://bugs.gnu.org/20255>.

* guix/scripts/package.scm (search-path-environment-variables): Change
  'profile' to 'profiles'; expect it to be a list.
  (display-search-paths): Likewise.
  (%default-options): Remove 'profile' entry.
  (%options) <--profile>: Keep previous values associated with 'profile'
  in RESULT.
  (guix-package)[process-actions, process-query]: Handle the possible
  lack of 'profile' pair in OPTS.
b68d2dbf — Ludovic Courtès 10 years ago
refresh: Discard PyPI updater when Guile-JSON is missing.

Reported by Sleep_Walker and Mathieu Lirzin <mthl@gnu.org>.

* guix/scripts/refresh.scm (maybe-updater, list-updaters): New macros.
  (%updaters): Use 'list-updaters' instead of 'list'.  Make
  %PYPI-UPDATER conditional.
650f1615 — Ludovic Courtès 10 years ago
edit: Improve error reporting when $EDITOR is not found.

Reported by Benno Evers <benno@bmevers.de>
at <https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00125.html>.

* guix/scripts/edit.scm (guix-edit): Wrap 'execl' call in 'catch'.
  Provide more meaningful error message.
67c920fa — Ludovic Courtès 10 years ago
edit: Lift helper procedure.

* guix/scripts/edit.scm (package->location-specification): New
  procedure, with code formerly...
  (guix-edit): ... here.  Use it.
5453de3d — Ludovic Courtès 10 years ago
import: hackage: Fix invalid use of 'leave'.

Reported by Paul van der Walt <paul@denknerd.org>
in <http://bugs.gnu.org/21829>.

* guix/scripts/import/hackage.scm (guix-import-hackage): Add missing
  argument in call to 'leave'.
d431b232 — David Thompson 10 years ago
scripts: container: Fix 'exec' command line parsing.

* guix/scripts/container/exec.scm (partition-args): Reimplement such
  that all args up to and including the PID are returned as the first of
  the two values.
bab020d7 — Cyril Roelandt 10 years ago
import: pypi: add updater

* guix/import/pypi.scm (guix-package->pypi-name,
  latest-release): New procedures.
  (%pypi-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %PYPI-UPDATER.
* doc/guix.texi (Invoking guix refresh): Mention PyPI
Next