~ruther/guix-local

ref: fa6c4213c6bdd435cf1cbf1afa37ed6d69db5d2d guix-local/guix/scripts d---------
cd295fbe — Ludovic Courtès 8 years ago
Revert "Add (guix self) and use it when pulling."

This reverts commit 5f93d97005897c2d859f0be1bdff34c88467ec61.

'guix pull' would fail because (guix self) needs 'scheme-files'
from (guix discovery), which was not exported until now.
5f93d970 — Ludovic Courtès 8 years ago
Add (guix self) and use it when pulling.

This mitigates <https://bugs.gnu.org/27284>.

* guix/self.scm: New file.
* Makefile.am (MODULES): Add it.
* build-aux/build-self.scm (libgcrypt, zlib, gzip, bzip2, xz)
(false-if-wrong-guile, package-for-current-guile, guile-json)
(guile-ssh, guile-git, guile-bytestructures): Remove.
(build): Rewrite to simply delegate to 'compiled-guix'.
* gnu/packages.scm (%distro-root-directory): Rewrite to try different
directories.
* guix/discovery.scm (guix): Export 'scheme-files'.
* guix/scripts/pull.scm (build-and-install): Split into...
(install-latest): ... this.  New procedure.  And...
(build-and-install): ... this, which now takes a monadic value argument.
(indirect-root-added): Remove.
(guix-pull): Call 'add-indirect-root'.  Call 'build-from-source' and
pass the result to 'build-and-install'.
a6591381 — Ludovic Courtès 8 years ago
pull: Trim import list.

* guix/scripts/pull.scm: Remove useless imports.
8e57e416 — Ludovic Courtès 8 years ago
refresh: Account for hidden packages.

Suggested by Marius Bakke <mbakke@fastmail.com>
in <https://bugs.gnu.org/29177>.

* guix/scripts/refresh.scm (all-packages): Pass #:select? to
'fold-packages'.
34b1f339 — Ludovic Courtès 8 years ago
graph: Remove mention of Graphviz from the summary line.

* guix/scripts/graph.scm (show-help): Remove mention of Graphviz from
the summary line.
6d6d1932 — Ludovic Courtès 8 years ago
lint: 'refresh' gracefully handles lack of networking access.

* guix/scripts/lint.scm (check-for-updates): Wrap
'package-latest-release*' call in 'with-networking-fail-safe'.
4b879e0a — Ludovic Courtès 8 years ago
lint: Extract network-related exception handling.

* guix/scripts/lint.scm (call-with-networking-fail-safe): New procedure.
(with-networking-fail-safe): New macro.
(current-vulnerabilities*): Rewrite in terms of 'with-networking-fail-safe'.
a1ff7e1d — Ludovic Courtès 8 years ago
scripts: Factorize option parsing sans 'GUIX_BUILD_OPTIONS'.

* guix/scripts.scm (parse-command-line): Add #:build-options? parameter
and honor it.
* guix/scripts/challenge.scm (guix-challenge): Use 'parse-command-line'
with #:build-options? #f instead of 'args-fold*'.
* guix/scripts/gc.scm (guix-gc): Likewise.
* guix/scripts/graph.scm (guix-graph): Likewise.
* guix/scripts/hash.scm (guix-hash): Likewise.
* guix/scripts/lint.scm (guix-lint): Likewise.
* guix/scripts/refresh.scm (guix-refresh): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
* guix/scripts/weather.scm (guix-weather): Likewise.
efff3dd4 — Ludovic Courtès 8 years ago
scripts: Use 'args-fold*' for command that do not honor build flags.

Fixes <https://bugs.gnu.org/28984>.
Reported by Eric Bavier.

* guix/scripts/challenge.scm (guix-challenge): Use 'args-fold*' instead
of 'parse-command-line'.
* guix/scripts/size.scm (guix-size): Likewise.
* guix/scripts/weather.scm (guix-weather): Likewise.
bf7dfb1f — Ludovic Courtès 8 years ago
challenge: Display an overall summary.

* guix/scripts/challenge.scm (summarize-report-list): New procedure.
(guix-challenge): Use it.
* doc/guix.texi (Invoking guix challenge): Adjust command output in
example.
d213cc8c — Ludovic Courtès 8 years ago
substitute: Don't send more than 1000 requests in a row.

Fixes <https://bugs.gnu.org/28731>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.

* guix/scripts/substitute.scm (at-most): New procedure.
(http-multiple-get): Use it to send at most 1000 requests at once.
44c6a87f — Ludovic Courtès 8 years ago
guix package: '--list-available' does not show superseded packages.

* guix/scripts/package.scm (process-query) <'list-available>: Filter out
P if it matches 'package-superseded'.
8c348825 — Ludovic Courtès 8 years ago
Add (guix progress).

Among other things, this removes (guix utils), (guix ui), (guix config),
etc. from the closure of (guix build download), as was the case since
798648515b77507c242752457b4dc17c155bad6e.

* guix/utils.scm (<progress-reporter>, call-with-progress-reporter):
Move to...
* guix/progress.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* guix/build/download.scm (current-terminal-columns)
(nearest-exact-integer, duration->seconds, seconds->string)
(byte-count->string, progress-bar, string-pad-middle)
(rate-limited, progress-reporter/file, dump-port*)
(time-monotonic): Move to progress.scm.
* guix/scripts/download.scm: Adjust accordingly.
* guix/scripts/substitute.scm: Likewise.
5efa0e4d — 宋文武 8 years ago
guix: substitute: Report the last progress in the child process.

Fixes <https://bugs.gnu.org/28756>.

* guix/utils.scm (filtered-port): Close the 'input' port for the current
process, and close it upon exit in the child process.
* guix/scripts/substitute.scm (progress-substitution): Display "\n\n" after
the reporter has finished.
61f28fe7 — Ludovic Courtès 8 years ago
lint: 'home-page' checker reports permanent redirects.

* guix/scripts/lint.scm (probe-uri): Add special case for HTTP 301.
(validate-uri): Likewise.
* tests/lint.scm ("home-page: 301, invalid")
("home-page: 301 -> 200", "home-page: 301 -> 404")
("source: 301 -> 200", "source: 301 -> 404"): New tests.
d8e89b1c — Ludovic Courtès 8 years ago
offload: Reduce the number of calls to 'machine-load'.

Previously we would call 'machine-load' once per machine, which was very
costly when there were many machines.  Now we arrange to call it only
once on average (when all the machines have the same 'speed' value).

* guix/scripts/offload.scm (random-seed, shuffle): New procedures.
(choose-build-machine)[machines+slots+loads]: Rename to...
[machines+slots]: ... this.  Remove load from the tuples therein.
[undecorate]: Adjust accordingly.
[machine-less-loaded-or-faster?]: Remove.
[machine-faster?]: New procedure.
Sort MACHINES+SLOTS according to 'machine-faster?'.  Call
'machine-load?' as the last thing.
abaee53c — 宋文武 8 years ago
substitute: Close the progress port after substitute finished.

Fixes <https://bugs.gnu.org/28756>.

* guix/scripts/substitute.scm (progress-substitution):
Call '(close-port progress)'.
735f6b63 — Ludovic Courtès 8 years ago
lint: Remove extra newline.

* guix/scripts/lint.scm (check-for-updates): Remove trailing "~%".
adf0c531 — Efraim Flashner 8 years ago
guix: lint: Add checker for new upstream versions.

* guix/scripts/lint.scm (check-for-updates): New procedure.
(%checkers): Add it.
* guix/scripts/refresh.scm (importer-modules, %updaters): Move
from here ...
* guix/upstream.scm: ... to here.
cca6941f — Oleg Pykhalov 8 years ago
pull: Add GUIX_PULL_URL environment variable.

* guix/scripts/pull.scm (%repository-url): Add GUIX_PULL_URL environment
  variable.
* doc/guix.texi (Invoking guix pull): Mention GUIX_PULL_URL.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Next