~ruther/guix-local

ref: 90335ccea65ba0b9d905bf2e5cac54ff2ef64d21 guix-local/guix/scripts d---------
952cf67c — Ludovic Courtès 9 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 9 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 9 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 9 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>
c95644f0 — Ludovic Courtès 9 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 9 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 9 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 9 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 9 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 9 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 9 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 9 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 9 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 9 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 9 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'.
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.
a8ac4f08 — Ludovic Courtès 9 years ago
vm: Estimate the disk size by default.

* gnu/build/vm.scm (estimated-partition-size): New procedure.
* gnu/system/vm.scm (expression->derivation-in-linux-vm):
Change #:disk-image-size default to 'guess.
[builder]: When DISK-IMAGE-SIZE is 'guess, use
'estimated-partition-size' and compute and estimate of the image size.
(qemu-image): Likewise.
* guix/build/store-copy.scm (file-size, closure-size): New procedures.
* guix/scripts/system.scm (%default-options): Change 'image-size' to
'guess.
* doc/guix.texi (Building the Installation Image): Remove '--image-size'
flag from example.
(Invoking guix system): Document the image size estimate.
0040140d — Ludovic Courtès 9 years ago
guix package: Allow '--rollback', after all.

* guix/scripts/package.scm (%options): Add "rollback" as an alias for
"roll-back".
fc8fdcf5 — Ludovic Courtès 9 years ago
guix package: 'guix package -r PKG -u' does not upgrade PKG.

Fixes <http://bugs.gnu.org/27262>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/package.scm (transaction-upgrade-entry): Check if ENTRY
matches 'manifest-transaction-removal-candidate?' and return TRANSACTION
if it does.
(process-actions): Move 'options->removable' from step 2 to step 1.
Next