Merge branch 'master' into core-updates
weather: Show "-m" option in help message. Reported by Alex Kost <alezost@gmail.com>. * guix/scripts/weather.scm (show-help): Show "-m".
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'.
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!'.
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>
Merge branch 'master' into core-updates
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'.
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.
publish: Remove 'regexp-exec' call from the hot path. * guix/scripts/publish.scm (extract-narinfo-hash): Rewrite without resorting to regexps.
substitute: Avoid repeated calls to 'length'. * guix/scripts/substitute.scm (fetch-narinfos)[update-progress!]: Move 'length' call outside of lambda.
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.
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.
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.
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'.
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.
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'.
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'.
Merge branch 'master' into core-updates
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.
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.