Age | Commit message (Expand) | Author |
2021-03-01 | import/cran: Fix detection of Fortran files....This fixes a bug whereby the Guix importer considers files like .f.* to be
Fortran files.
The expression "\\.f(90|95)?" would match a lot of files containing ".f"
although they are not Fortran files. Instead we should only consider files
with this *suffix*.
* guix/import/cran.scm (directory-needs-fortran?): Only check for suffixes.
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
| Mădălin Ionel Patrașcu |
2021-03-01 | import: hackage: Accept optional version parameter....* guix/import/hackage.scm (hackage-recursive-import): Add the VERSION key.
Make REPO a key.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Xinglu Chen |
2021-03-01 | serialization: Micro-optimize string literal output in 'write-file-tree'....This reduces allocations and bit twiddling in the loop.
* guix/serialization.scm (write-literal-strings): New macro.
(write-file-tree): Use it in lieu of 'write-string' calls where applicable.
| Ludovic Courtès |
2021-03-01 | environment: Allow compilation with Guile 2.2....Fixes <https://bugs.gnu.org/46826>.
Reported by cage <cage-dev@twistfold.it>.
* guix/scripts/environment.scm (guix-environment): Move 'manifest'
definition before expression.
| Ludovic Courtès |
2021-02-25 | syscalls: Add 'mounts' and the <mount> record type....* guix/build/syscalls.scm (<mount>): New record type.
(option-string->mount-flags, mount-flags)
(octal-decode, mounts): New procedures.
(mount-points): Rewrite in terms of 'mount'.
* tests/syscalls.scm ("mounts"): New test.
| Ludovic Courtès |
2021-02-25 | syscalls: Define MS_RELATIME....* guix/build/syscalls.scm (MS_RELATIME): New variable.
| Ludovic Courtès |
2021-02-25 | describe: Make sure package-channels always returns a list....* guix/describe.scm (package-channels): Return an empty list if the file
origin could not be determined.
| Mathieu Othacehe |
2021-02-25 | describe: Add missing include....This is a follow-up of 17fbd5a5c9c09ff54ce95985dcbcdd1b9c60a34e.
* guix/describe.scm: Add "channel-name" to (guix channels) autoload.
| Mathieu Othacehe |
2021-02-25 | describe: Add package-channels....* guix/describe.scm (package-channels): New procedure.
(package-provenance): Rewrite using package-channels procedure.
| Mathieu Othacehe |
2021-02-24 | guix: scripts: Fix corner cases of hint for option typo....* guix/scripts.scm (option-hint): Fix corner cases.
(parse-command-line)[parse-options-from]: Remove 'string?' check
introduced in 11f11d7ecb817d1421f8b5340bcced59396d8708.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| zimoun |
2021-02-24 | substitute: Ensure backtraces go to file descriptor 4....Fixes <https://bugs.gnu.org/46362>.
Reported by Zhu Zihao <all_but_last@163.com>.
Previously, backtraces due to uncaught exceptions would always to go
file descriptor 2; the daemon would read it and error out with something
like:
error: got unexpected path `Backtrace:' from substituter
This patch fixes that by ensuring backtraces are properly displayed on
file descriptor 4.
* guix/scripts/substitute.scm (with-redirected-error-port): New macro.
(guix-substitute): Use 'with-redirected-error-port' instead of 'parameterize'.
| Ludovic Courtès |
2021-02-24 | substitute: Do not unwind stack traces upon uncaught exceptions....This is similar to commit a168c3e4f8d580f70e1c26bcdfc5b8378b2fa42d.
* guix/scripts/substitute.scm (with-networking): Use
'with-throw-handler' instead of 'catch'.
| Ludovic Courtès |
2021-02-24 | ui: Bug-report URL in '--help' can be translated....* guix/ui.scm (show-bug-report-information): Add "/en" to the help URL
and pass it to 'G_'.
| Ludovic Courtès |
2021-02-24 | guix: renpy-build-system: Quote data directory....This prevents generated launchers and desktop files from inadvertently
crashing if the directory name contains a space.
* gnu/build/renpy-build-system.scm (install, install-desktop-file): Use ~s
to format data directory.
| Leo Prikler |
2021-02-23 | packages: Improve the docstring of PACKAGE/INHERIT....* guix/packages.scm (package/inherit): Try to clarify the docstring.
| Leo Famulari |
2021-02-23 | store: Micro-optimize object cache lookup....This avoids a closure allocation when 'lookup-cached-object' is called.
* guix/store.scm (lookup-cached-object): Avoid optional/keyword
arguments and inline.
(%mcached): Adjust accordingly.
| Ludovic Courtès |
2021-02-23 | gexp: Reduce allocations in 'gexp-attribute'....* guix/gexp.scm (gexp-attribute): Use 'fold' and 'fold/tree' instead of
'append-map'.
| Ludovic Courtès |
2021-02-23 | gexp: Reduce allocations while traversing lists....This reduces the total amount of memory allocated by 8% when running
"guix build qemu -d --no-grafts".
* guix/gexp.scm (fold/tree): New procedure.
(gexp-inputs)[interesting?]: New procedure.
[add-reference-inputs]: Change (lst ...) clause to (? pair? lst), and
use 'fold/tree' to recurse into it.
(gexp-inputs)[add-reference-output]: Likewise, and remove
plain (lst ...) clause.
Call 'fold'.
(gexp->sexp)[reference->sexp]: In the list case, avoid boxing and
recursive call when the object has a plain non-aggregate type.
| Ludovic Courtès |
2021-02-23 | gexp: Micro-optimize 'gexp->sexp' and 'lower-inputs'....* guix/gexp.scm (lower-inputs, gexp->sexp): Change keyword parameters to
positional parameters. Adjust callers accordingly.
* tests/gexp.scm (gexp->sexp*, "gexp->file"): Adjust accordingly.
| Ludovic Courtès |
2021-02-23 | gexp: Keep 'lower-inputs' private....It had been made public in 6b6298ae39bfe185ce1ab18bb3d641ddfad17c8f but
it's no longer needed since 779aa003fbacbbcb6973f289b607d1d285009cec.
* guix/gexp.scm (lower-inputs): Do not export.
| Ludovic Courtès |
2021-02-23 | gexp: 'gexp-inputs' returns both native and non-native inputs....This avoids double traversal of references and extra bookkeeping,
thereby further reducing memory allocations.
* guix/gexp.scm (lower-gexp): Include only one call to 'lower-inputs'.
(gexp-inputs): Remove #:native? parameter.
[set-gexp-input-native?]: New procedure.
[add-reference-inputs]: Use it.
(gexp-native-inputs): Remove.
* tests/gexp.scm (gexp-native-inputs): Remove.
(gexp-input->tuple): Include 'gexp-input-native?'.
("let-system")
("let-system, nested")
("ungexp + ungexp-native")
("ungexp + ungexp-native, nested")
("ungexp + ungexp-native, nested, special mixture")
("input list")
("input list + ungexp-native")
("input list splicing")
("input list splicing + ungexp-native-splicing")
("gexp list splicing + ungexp-splicing"): Adjust accordingly.
| Ludovic Courtès |
2021-02-23 | gexp: 'gexp-inputs' returns a list of <gexp-input> records....This slightly reduces memory allocation.
* guix/gexp.scm (lower-inputs): Expect a list of <gexp-input> rather
than a list of tuples.
(lower-reference-graphs)[tuple->gexp-input]: New procedure.
Use it.
(gexp-inputs): Return a list of <gexp-input> rather than a list of
tuples.
* tests/gexp.scm (gexp-input->tuple): New procedure.
("one input package")
("one input package, dotted list")
("one input origin")
("one local file")
("one local file, symlink")
("one plain file")
("two input packages, one derivation, one file")
("file-append")
("file-append, output")
("file-append, nested")
("let-system")
("let-system, nested")
("ungexp + ungexp-native")
("ungexp + ungexp-native, nested")
("ungexp + ungexp-native, nested, special mixture")
("input list")
("input list + ungexp-native")
("input list splicing")
("input list splicing + ungexp-native-splicing")
("gexp list splicing + ungexp-splicing"): Adjust accordingly.
| Ludovic Courtès |
2021-02-23 | gexp: Micro-optimize sexp serialization....* guix/gexp.scm (sexp->string): New procedure.
(gexp->derivation): Use it instead of 'object->string'.
| Ludovic Courtès |
2021-02-23 | store: Object cache profiling shows the number of entries....* guix/store.scm (record-cache-lookup!): Add 'size' variable; keep it
up-to-date and display it.
| Ludovic Courtès |
2021-02-23 | grafts: Inline 'grafting?' and 'set-grafting'....As for 'current-target-system' & co., this makes sure we don't
needlessly allocate closures.
* guix/grafts.scm (grafting?, set-grafting): Inline.
| Ludovic Courtès |
2021-02-22 | scripts: Don't trigger option hints for short options....Previously, 'guix install foo -r bar' would crash with a backtrace
because NAME would be #\r (a character instead of a string).
* guix/scripts.scm (parse-command-line)[parse-options-from]: Call
'option-hint' only when NAME is a string.
| Ludovic Courtès |
2021-02-22 | profiles: Fix typo in manifest comment....* guix/build/profiles.scm (build-profile): Fix typo.
| Ludovic Courtès |
2021-02-22 | describe: Fix typo in 'manifest-entry-with-provenance'....* guix/describe.scm (manifest-entry-with-provenance): Fix first argument
to 'assq'.
| Ludovic Courtès |
2021-02-22 | packages: 'package-field-location' preserves the original file name....This fixes a regression introduced in
9a38bed2cf32e9462badfa43e74cdd4580e804fc.
* guix/packages.scm (package-field-location): Do not shadow the 'file'
variable.
| Ludovic Courtès |
2021-02-22 | substitute: Rework connection error handling....This is part of trying to reduce the interdependency of code within the
substitute module.
This commit addresses some of the error handling that was performed through
open-connection-for-uri/maybe. The new approach is to use
call-with-connection-error-handling, and wrap calls to http-multiple-get and
http-fetch with that procedure, which takes care of handling connection
errors.
I think this is even slightly more rigerous than the previous setup, because
this approach handles connection errors that occur when http-multiple-get
reconnects to a host.
* guix/scripts/substitute.scm (open-connection-for-uri/maybe): Transform in to
call-with-connection-error-handling.
(fetch-narinfos): Use call-with-connection-error-handling.
(process-query): Replace open-connection-for-uri/maybe with
open-connection-for-uri/cached.
(open-connection-for-uri/cached): Set a default timeout, matching the
behaviour in open-connection-for-uri/maybe.
(process-substitution): Use call-with-connection-error-handling.
| Christopher Baines |
2021-02-22 | substitute: Remove fetch-narinfos use open-connection-for-uri/maybe....At least by default. Instead, make the open-connection procedure a parameter,
and make the default guix:open-connection-for-uri. Do so similarly for
lookup-narinfos and lookup-narinfos/diverse which work towards calling
fetch-narinfos.
This means this code can be moved to a different module, without having
use/move the connection caching code.
* guix/scripts/substitute.scm (fetch-narinfos): Add #:open-connection
argument, and call http-multiple-get with it.
(lookup-narinfos) Add #:open-connection argument, and call fetch-narinfos with
it.
(lookup-narinfos/diverse): Add #:open-connection argument, and call
lookup-narinfos with it.
(process-query): Call lookup-narinfos/diverse with #:open-connection
open-connection-for-uri/maybe.
| Christopher Baines |
2021-02-22 | substitute: Inline fetch in to process-substitutes....As it's only called in one place, and this should make the code easier to
read.
* guix/scripts/substitute.scm (fetch): Move procedure inside…
(process-substitution): …here.
| Christopher Baines |
2021-02-22 | substitute: Remove redundant fetch arguments....It's just called in one place, with hardcoded argument values, so just inline
them.
* guix/scripts/substitute.scm (fetch): Remove arguments that don't vary, copy
the values from the call site in process-substitution.
(process-substitution): Remove unnecessary argument values from fetch call.
| Christopher Baines |
2021-02-22 | substitute: Remove now redundant connection caching helpers....Failures now should be handled where they occur, and if there's a problem
that's symptomatic of an issue with the connection, the port should be closed.
* guix/scripts/substitute.scm (call-with-cached-connection): Remove procedure.
(with-cached-connection): Remove syntax rule.
| Christopher Baines |
2021-02-22 | substitute: Change connection cache handling in process-substitution....Just pass open-connection-for-uri/maybe to http-fetch, this removes the need
for with-cached-connection and passing the port in.
* guix/scripts/substitute.scm (fetch): Don't take a port as an argument, and
pass open-connection-for-uri/maybe to http-fetch.
(process-substitution): Don't call fetch with with-cached-connection.
| Christopher Baines |
2021-02-22 | http-client: Accept #:open-connection in http-fetch....So that an alternative procedure can be passed in, perhaps to perform
connection caching.
* guix/http-client.scm (http-fetch): Add an #:open-connection keyword
argument.
| Christopher Baines |
2021-02-22 | substitute: Stop using call-with-cached-connection in fetch-narinfos....Instead, just pass open-connection-for-uri/maybe to http-multiple-get. This
code should be functionaly similar to the previous code. The eventual aim of
this is to make the connection caching not mandatory in fetch-narinfos.
* guix/scripts/substitute.scm (fetch-narinfos): Remove use of
call-with-cached-connection.
| Christopher Baines |
2021-02-22 | substitute: open-connection-for-uri/maybe add #:verify-certificate?....As this is used by http-fetch and http-multiple-get when they call the
specified open connection procedure.
* guix/scripts/substitute.scm (open-connection-for-uri/maybe): Support
#:verify-certificate?.
| Christopher Baines |
2021-02-22 | http-client: Add error handling to http-multiple-get....Making sure to close the port if it looks to be unusable. This closing of the
port will allow for caching connections, without caching broken connections,
as the cache can avoid handing out closed ports.
* guix/http-client.scm (http-multiple-get): Try to catch exceptions that
happen if the port is unusable, this is a adaptation of code within the (guix
scripts substitute) module.
| Christopher Baines |
2021-02-22 | guix: Move http-multiple-get to (guix http-client)....From (guix scripts substitute). This will make it easier to reuse this code.
* guix/scripts/substitute.scm (http-multiple-get): Remove, and move to…
* guix/http-client.scm (http-multiple-get): …here.
| Christopher Baines |
2021-02-22 | substitute: Remove redundant let block from fetch....* guix/scripts/substitute.scm (fetch): Remove redundant let block.
| Christopher Baines |
2021-02-22 | substitute: Remove connection handling from fetch....http-fetch does this, so just use that code instead.
* guix/scripts/substitute.scm (fetch): Remove connection handling when the
port is closed.
| Christopher Baines |
2021-02-22 | substitute: Remove buffer handling from fetch....http-fetch does this, so just set the right option.
* guix/scripts/substitute.scm (fetch): Remove buffering code, and pass
#:buffered? to http-fetch.
| Christopher Baines |
2021-02-22 | packages: 'package-field-location' handles 'search-path' returning #f....Fixes <https://bugs.gnu.org/46390>.
Reported by zimoun <zimon.toutoune@gmail.com>.
This is similar to the fix in d10474c38d58bdc676e64336769dc2e00cdfa8ed.
* guix/packages.scm (package-field-location): Handle FILE not in %LOAD-PATH.
* tests/guix-lint.sh: Add test.
| Ludovic Courtès |
2021-02-19 | ui: Fix typo in description....* guix/ui.scm (switch-to-generation*): Fix typo in description.
| Brice Waegeneire |
2021-02-17 | scripts: system: Accept <image> records as input....* guix/scripts/system.scm (system-derivation-for-action): Replace "os"
argument by "image". Remove "image-size", "image-type", "label" and
"volatile-root?" arguments.
(perform-action): Ditto.
(process-action): Construct the <image> record and pass it to "perform-action"
procedure.
* tests/guix-system.sh: Adapt accordingly.
* gnu/system/images/hurd.scm: Return the default image.
* gnu/system/images/novena.scm: Ditto.
* gnu/system/images/pine64.scm: Ditto.
* gnu/system/images/pinebook-pro.scm Ditto.
| Mathieu Othacehe |
2021-02-17 | scripts: system: Remove 'vm-image' command....Remove the 'vm-image' command that has been superseded by the 'image'
command.
* gnu/system/vm.scm (system-qemu-image): Remove it.
* guix/scripts/system.scm (system-derivation-for-action): Mark 'vm-image'
command as deprecated and use the image API to produce the VM image.
(perform-action, show-help): Adapt accordingly.
* tests/guix-system.sh: Ditto.
* doc/guix.texi (Invoking guix system,
Running Guix in a VM): Ditto.
* etc/completion/fish/guix.fish: Ditto.
* etc/completion/zsh/_guix: Ditto.
| Mathieu Othacehe |
2021-02-15 | ftp-client: Before 'PASV', try 'EPSV' first for IPv6....This fixes <https://bugs.gnu.org/46481>.
* guix/ftp-client.scm (ftp-epsv, ftp-passive): New procedures.
(ftp-list, ftp-retr): Replace call to 'ftp-pasv' with 'ftp-passive'.
| 宋文武 |
2021-02-12 | import: crate: Use repository when home-page is unavailable...* guix/import/crate.scm (make-crate-sexp): Always use home-page, which is
properly set up by the caller.
(crate->guix-package): Make sure to use the repository when home-page is null.
| Nicolas Goaziou |
2021-02-12 | pull: Create the "${XDG_CONFIG_HOME}/guix" directory when needed....This fixes <https://bugs.gnu.org/46269>.
* guix/scripts/pull.scm (ensure-default-profile): Add a 'mkdir-p' call before
'symlink'.
| 宋文武 |