~ruther/guix-local

ref: 8ec0877a6bbddf0d82fd09309a79e19bf507a115 guix-local/guix/scripts d---------
e0b9e377 — Marius Bakke 8 years ago
Merge branch 'master' into core-updates
952cf67c — Ludovic Courtès 8 years ago
weather: Show "-m" option in help message.

Reported by Alex Kost <alezost@gmail.com>.

* guix/scripts/weather.scm (show-help): Show "-m".
84620dd0 — Ludovic Courtès 8 years ago
offload: Fix potential file descriptor and memory leak.

The '%slots' list could grow indefinitely; in practice though,
guix-daemon is likely to restart 'guix offload' often enough.

* guix/scripts/offload.scm (%slots): Remove.
(choose-build-machine): Don't 'set!' %SLOTS.  Return the acquired slot
as a second value.
(process-request): Adjust accordingly.  Release the returned slot after
'transfer-and-offload'.
236cae06 — Ludovic Courtès 8 years ago
offload: Disconnect sessions created by 'machine-load'.

This fixes a memory leak that can be seen by running:

  (map (lambda _ (machine-load m)) (iota 1000))

* guix/scripts/offload.scm (machine-load): Add call to 'disconnect!'.
585347d7 — Ludovic Courtès 8 years ago
Add 'guix weather'.

* guix/scripts/weather.scm: New file.
* Makefile.am (MODULES): Add it.
* doc/guix.texi (Substitutes, Invoking guix publish): Mention "guix
weather".
(Invoking guix weather): New node.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
6c1a317e — Leo Famulari 8 years ago
Merge branch 'master' into core-updates
c95644f0 — Ludovic Courtès 8 years ago
publish: Make the cache eviction policy less aggressive.

Suggested by Mark H Weaver <mhw@netris.org>.

* guix/scripts/publish.scm (nar-expiration-time): New procedure.
(render-narinfo/cached): Use it as the #:entry-expiration passed to
'maybe-remove-expired-cache-entries'.
deac674a — Ludovic Courtès 8 years ago
publish: Avoid 'valid-path?' RPC for non-existent items.

* guix/scripts/publish.scm (render-narinfo/cached): Call 'file-exists?'
before calling 'valid-path?'.  This makes the 404 path slightly faster.
33463986 — Ludovic Courtès 8 years ago
publish: Remove 'regexp-exec' call from the hot path.

* guix/scripts/publish.scm (extract-narinfo-hash): Rewrite without
resorting to regexps.
75a4d86f — Ludovic Courtès 8 years ago
substitute: Avoid repeated calls to 'length'.

* guix/scripts/substitute.scm (fetch-narinfos)[update-progress!]: Move
'length' call outside of lambda.
3d3e93b3 — Ludovic Courtès 8 years ago
substitute: Optimize hash-part-to-path conversion on non-200 responses.

Previously this operation was linear in the number of requests and
involved costly calls to 'string-contains'.

* guix/scripts/substitute.scm (fetch-narinfos)[hash-part->path]: New
procedure.
[handle-narinfo-response]: Use it for caching when CODE is not 200.
561f4e45 — Ludovic Courtès 8 years ago
guix package: '-l' correctly handles zero-generation profiles.

* guix/scripts/package.scm (process-query) <'list-generations>: Properly
handle the case where 'profile-generations' returns the empty list.
edbe07cd — Ludovic Courtès 8 years ago
guix package: Trim trailing slashes from the profile name.

Fixes <https://bugs.gnu.org/25762>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

* guix/scripts/package.scm (canonicalize-profile): Trim trailing slashes
from PROFILE.
5058bf56 — Ludovic Courtès 8 years ago
guix system: Use "image.iso" as the name of ISO images.

* guix/scripts/system.scm (system-derivation-for-action): Pass #:name to
'system-disk-image'.
b547349d — Ludovic Courtès 8 years ago
substitute: Work around Guile 2.2 'time-monotonic' bug.

Prior to this change, half of the cached narinfos would expire
immediately since they contained the number of nanoseconds instead of
the number of seconds as their date.

* guix/scripts/substitute.scm (time-monotonic) <guile-2.2>: Define, as a
workaround.
a6c1fe82 — Ludovic Courtès 8 years ago
size: Add '--sort=KEY'.

* guix/scripts/size.scm (profile-closure<?, profile-self<?): New
procedures.
(display-profile): Add #:profile<? parameter and honor it.
(show-help, %options): Add '--sort'.
(%default-options): Add 'profile<?'.
(guix-size): Pass PROFILE<? to 'display-profile*'.
* doc/guix.texi (Invoking guix size): Document '--sort'.
1ac3a488 — Ludovic Courtès 8 years ago
environment: Rationalize calls to 'set-build-options'.

Before this change '--substitute-urls' would be ignored.

* guix/scripts/environment.scm (build-environment): Remove redundant
call to 'set-build-options-from-command-line*'.
(guix-environment): Move 'set-build-options-from-command-line' right
after 'with-store'.
c8eb2b8c — Leo Famulari 9 years ago
Merge branch 'master' into core-updates
cc1dfc20 — Ludovic Courtès 9 years ago
copy: Default to port 22.

Failing to do that, "%p" would be "0" when using "ProxyCommand"
in ~/.ssh/config.

* guix/scripts/copy.scm (send-to-remote-host): Default to port 22.
(retrieve-from-remote-host): Likewise.
3f4d8a7f — Danny Milosavljevic 9 years ago
guix system: Add "--file-system-type" option.

* guix/scripts/system.scm (process-action): Pass file-system-type to ...
(perform-action): ... here.  Add new keyword argument.  Pass new value to ...
(system-derivation-for-action): ... here.  Add new keyword argument.
Pass new value to system-disk-image.
* doc/guix.texi (disk-image): Document new option.
Next