summaryrefslogtreecommitdiff
path: root/guix/store.scm
AgeCommit message (Collapse)Author
2016-07-16build: Substitute URLs now default to "mirror.hydra.gnu.org" alone.Ludovic Courtès
* config-daemon.ac: Remove "hydra.gnu.org" from 'guix_substitute_urls'. * guix/store.scm (%default-substitute-urls): Remove "hydra.gnu.org".
2016-06-20store: 'register-path' no longer swallows 'system-error' exceptions.Ludovic Courtès
* guix/store.scm (register-path): Do not catch 'system-error'.
2016-06-15store: Add #:select? parameter to 'add-to-store'.Ludovic Courtès
* guix/store.scm (write-arg): Remove 'file' case. (true): New procedure. (add-to-store): Add #:select? parameter and honor it. Use hand-coded stub instead of 'operation'. (interned-file): Add #:select? parameter and honor it. * doc/guix.texi (The Store Monad): Adjust 'interned-file' documentation accordingly.
2016-05-24store: 'requisites' now takes a list of store items.Ludovic Courtès
* guix/store.scm (fold-path): Change 'path' to 'paths' and adjust body accordingly. (requisites): Likewise. * guix/scripts/environment.scm (inputs->requisites): Adjust user accordingly. * guix/scripts/size.scm (requisites*): Likewise. * guix/scripts/gc.scm (guix-gc): Likewise. * tests/store.scm ("requisites"): Likewise.
2016-05-17store: Clarify 'query-path-hash' docstring.Ludovic Courtès
* guix/store.scm (query-path-hash): Clarify docstring.
2016-05-04utils: Move combinators to (guix combinators).Ludovic Courtès
* guix/utils.scm (compile-time-value, memoize, fold2) (fold-tree, fold-tree-leaves): Move to... * guix/combinators: ... here. New file. * tests/utils.scm ("fold2, 1 list", "fold2, 2 lists") (fold-tree tests): Move to... * tests/combinators.scm: ... here. New file. * Makefile.am (MODULES, SCM_TESTS): Add them. * gnu/packages.scm, gnu/packages/bootstrap.scm, gnu/services/herd.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/elpa.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports accordingly.
2016-04-20substitute: Install the client's locale.Ludovic Courtès
* guix/store.scm (set-build-options): Add #:locale parameter and honor it. * guix/scripts/substitute.scm (guix-substitute): Install the client's locale.
2016-04-15substitute: Honor the number of columns of the client terminal.Ludovic Courtès
* guix/store.scm (set-build-options): Add #:terminal-columns parameter and honor it. * guix/scripts/substitute.scm (client-terminal-columns): New procedure. (guix-substitute): Use it to parameterize 'current-terminal-columns'.
2016-03-28store: Prepend mirror.hydra.gnu.org to %DEFAULT-SUBSTITUTE-URLS.Ludovic Courtès
This allows GuixSD to default to the right list of URLs, with mirror.hydra.gnu.org coming first. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/store.scm (%default-substitute-urls): Prepend "mirror.hydra.gnu.org."
2016-03-16build: Default to "https://mirror.hydra.gnu.org/" for substitutes.Ludovic Courtès
* config-daemon.ac: Check for (gnutls) and define 'GUIX_SUBSTITUTE_URLS'. * nix/nix-daemon/guix-daemon.cc (main): Use GUIX_SUBSTITUTE_URLS. * guix/store.scm (%default-substitute-urls): Use 'https' when (gnutls) is available. * doc/guix.texi (Binary Installation): Mention mirrors (Invoking guix-daemon): Mention mirror.hydra.gnu.org. (Substitutes): Mention mirrors. (Invoking guix archive): Show https URLs.
2016-03-14store: 'references/substitutes' caches its results.Ludovic Courtès
* guix/store.scm (%reference-cache): New variable. (references/substitutes): Use it.
2016-03-05store: 'references/substitutes' correctly handles the order of substitutes.Ludovic Courtès
Before that, 'references/substitutes' would assume that 'substitutable-path-info' would return things in the same order as its arguments, which is not the case. Thus, it would sometimes provide incorrect reference information, occasionally leading to infinite loop (because dependency information would denote cycles.) Fixes <http://bugs.gnu.org/22914>. Reported by Eric Bavier <ericbavier@openmailbox.org>. * guix/store.scm (references/substitutes): Make ITEMS the first argument of the loop; match on it. Use 'any' to find a matching substitute. (substitutable-path-info): Clarify docstring about ordering.
2016-03-05store: Add 'references/substitutes'.Ludovic Courtès
* guix/store.scm (references/substitutes): New procedure. * tests/store.scm ("references/substitutes missing reference info") ("references/substitutes with substitute info"): New tests.
2016-02-26store: 'path-info-deriver' is #f when there is no deriver.Ludovic Courtès
* guix/store.scm (read-path-info): Use #f when we get the empty string for DERIVER. * guix/scripts/publish.scm (narinfo-string): Adjust accordingly. * tests/store.scm ("path-info-deriver"): New test.
2016-02-25store: Clarify documentation of 'valid-path?'.Ludovic Courtès
* guix/store.scm (valid-path?): Improve docstring. * doc/guix.texi (The Store): Update accordingly.
2016-02-12store: Add monadic access to '%current-system'.Ludovic Courtès
* guix/store.scm (current-system, set-current-system): New procedures. * tests/store.scm ("current-system"): New test.
2015-12-08store: Allow clients to request multiple builds.Ludovic Courtès
* guix/store.scm (set-build-options): Add #:rounds parameter and honor it. * tests/store.scm ("build multiple times"): New test.
2015-12-04store: 'build-things' now supports older daemon protocols.Ludovic Courtès
This is a followup to d203d3d. * guix/store.scm (build-things): Add 'build/old'. Use it when STORE's minor version is less than 15.
2015-12-03store: Add mode parameter to 'build-paths'.Ludovic Courtès
* guix/store.scm (%protocol-version): Set minor to 15. (build-mode): New enumerate type. (build-things): Add 'mode' parameter; pass it to the RPC. * tests/store.scm ("build-things, check mode"): New check.
2015-12-03store: Update to the new daemon protocol.Ludovic Courtès
* guix/store.scm (%protocol-version): Set minor to 14. (open-connection): Add 'cpu-affinity' parameter and honor it.
2015-10-28store: Use the daemon's substitute URLs by default.Ludovic Courtès
Partly fixes <http://bugs.gnu.org/20217>. * guix/store.scm (set-build-options): Change #:substitute-urls to default to #f. Send the 'substitute-urls' pair only if SUBSTITUTE-URLS is true. * guix/scripts/build.scm (set-build-options-from-command-line): Do not default to %DEFAULT-SUBSTITUTE-URLS for #:substitute-urls. * guix/scripts/size.scm (%default-options): Remove 'substitute-urls'.
2015-09-28store: Add 'query-failed-paths' and 'clear-failed-paths' RPCs.Ludovic Courtès
Suggested by Mark H Weaver <mhw@netris.org>. * guix/store.scm (query-failed-paths, clear-failed-paths): New procedures. * tests/guix-daemon.sh: Add test with daemon started with --cache-failures.
2015-09-18store: Add 'set-build-options*'.Alex Kost
Suggested by: Ludovic Courtès <ludo@gnu.org>. * guix/store.scm (set-build-options*): New procedure.
2015-07-13guix build: Add '--substitute-urls' client option.Ludovic Courtès
* guix/scripts/build.scm (%standard-build-options, show-build-options-help): Add --substitute-urls=URLS. (set-build-options-from-command-line): Honor it. * guix/store.scm (%default-substitute-urls): Make public. * doc/guix.texi (Substitutes): Add xref to the client --substitute-urls option. (Invoking guix build): Document it. (Invoking guix-daemon): Add 'daemon-substitute-urls' anchor.
2015-07-08store: 'run-with-store' initializes %CURRENT-TARGET-SYSTEM to #f.Ludovic Courtès
* guix/store.scm (run-with-store): Set %CURRENT-TARGET-SYSTEM to #f. * tests/gexp.scm ("gexp->derivation vs. %current-target-system"): New test.
2015-06-19store: Memoize 'add-to-store' based on the result of 'lstat', not 'stat'.Ludovic Courtès
* guix/store.scm (add-to-store): Change 'stat' call to 'lstat'. Clarify docstring.
2015-06-06store: Add 'verify-store' RPC.Ludovic Courtès
* guix/store.scm (operation-id): Add 'verify-store'. (verify-store): New procedure. (set-build-options): Adjust comment. * tests/store.scm ("verify-store", "verify-store + check-contents"): New tests.
2015-05-26gc: ignore trailing slash or subdirectories for `guix gc -d'Cyrill Schenkel
Fixes <http://bugs.gnu.org/19757>. * guix/scripts/gc.scm (guix-gc): Convert paths to direct store paths. * guix/store.scm (direct-store-path): Get rid of subdirectories in store path. * tests/guix-gc.sh: New tests. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-05-19store: Add 'optimize-store' RPC.Ludovic Courtès
* guix/store.scm (operation-id): Add 'optimize-store'. (optimize-store): New procedure.
2015-04-04store: Add query-path-info operation.David Thompson
* guix/store.scm (<path-info>): New record type. (read-path-info): New procedure. (read-arg): Add 'path-info' syntax. (query-path-info): New variable. * tests/store.scm ("query-path-info"): New test.
2015-03-22store: Default to a non-empty list of substituters.Ludovic Courtès
Fixes <http://bugs.gnu.org/20163>. Reported by Mark H Weaver <mhw@netris.org>. * guix/store.scm (%default-substitute-urls): New variable. (set-build-options): Change default value of #:substitute-urls to %DEFAULT-SUBSTITUTE-URLS.
2015-03-18store: Remove debugging leftover.Ludovic Courtès
* guix/store.scm (set-build-options): Remove leftover 'pk' call from 41c45e7.
2015-03-18store: Add preliminary support for client-supplied substitute URLs.Ludovic Courtès
* guix/store.scm (set-build-options): Rename #:binary-caches to #:substitute-urls. Actually pass it in 'pairs' under the "substitute-urls" key. * guix/scripts/substitute-binary.scm (%cache-url): Add comment for "untrusted-substitute-urls".
2015-03-05store: Attempt to decode build logs as UTF-8.Ludovic Courtès
* guix/serialization.scm (read-maybe-utf8-string): New procedure. * guix/store.scm (process-stderr): Use it for the build log and errors. * tests/store.scm ("current-build-output-port, UTF-8", "current-build-output-port, UTF-8 + garbage"): New tests.
2015-02-12store: Add optional 'references' parameter to 'text-file'.Ludovic Courtès
* guix/store.scm (text-file): Add optional 'references' parameter. Pass it to 'add-text-to-store'. * doc/guix.texi (The Store Monad): Adjust accordingly.
2015-02-02store: Remove 'build-derivations'.Ludovic Courtès
* guix/store.scm (build-derivations): Remove. * guix/derivations.scm (build-derivations): Write in terms of 'build-things'. * doc/guix.texi (Invoking guix build): Adjust text accordingly.
2015-02-02store: Add 'build-things'.Ludovic Courtès
* guix/store.scm (operation-id): Rename 'build-derivations' to 'build-things', as per Nix commit 1aba0bf0. (build-derivations): Rename to... (build-things): ... this. Keep 'build-derivations' as an alias. (build): New procedure. * tests/store.scm ("build-things with output path", "substitute + build-things with output path"): New tests.
2015-01-21store: Change 'run-with-store' to return a single value.Ludovic Courtès
* guix/store.scm (run-with-store): Wrap 'run-with-state' in 'call-with-values'. Return only the first value.
2015-01-18store: Change 'store-lower' to preserve the original procedure's documentation.Ludovic Courtès
* guix/store.scm (preserve-documentation): New procedure. (store-lift, store-lower): Use it.
2015-01-17store: Make '%store-monad' an alias for '%state-monad'.Ludovic Courtès
* guix/store.scm (define-alias): New macro. (%store-monad, store-return, store-bind): Define as aliases of the corresponding %STATE-MONAD part. (store-lift, text-file, interned-file): Return STORE as a second value. (run-with-store): Use 'run-with-state'. * guix/packages.scm (set-guile-for-build, package-file): Return STORE as a second value. * guix/monads.scm: Remove part of the module commentary.
2015-01-17store: Remove unused variable.Ludovic Courtès
* guix/store.scm (export-paths): Remove unused variable 's'.
2015-01-17store: Add #:recursive? parameter to 'export-paths'.Ludovic Courtès
* guix/store.scm (export-paths): Add #:recursive? parameter and honor it. * tests/store.scm ("export/import incomplete", "export/import recursive"): New tests.
2015-01-14store: Add 'store-lower'.Ludovic Courtès
* guix/store.scm (store-lower): New procedure. * tests/store.scm ("store-lower"): New test.
2015-01-14monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès
This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly.
2014-11-23store: default to serial "scheduler"nebuli
* guix/store.scm (set-build-options): exchange default argument values Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-11-04store: Invalidate caches once GC has run.Ludovic Courtès
* guix/store.scm (run-gc): Add calls to 'hash-clear!'. * tests/store.scm ("add-text-to-store vs. delete-paths", "add-to-store vs. delete-paths"): New tests.
2014-10-09Break module cycle involving (guix store) and (guix ui).Ludovic Courtès
Before, there was a cycle along the lines of: (guix store) -> (guix nar) -> (guix ui) -> (guix store) This caused problems, as discussed at: http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00109.html This patch removes cycles in the (guix ...) modules. * guix/nar.scm (&nar-error, &nar-read-error, dump, write-contents, read-contents, %archive-version-1, write-file, restore-file): Move to... * guix/serialization.scm: ... here. * guix/store.scm: Remove dependency on (guix nar). * guix/scripts/hash.scm, guix/scripts/offload.scm, guix/scripts/substitute-binary.scm, tests/nar.scm, tests/store.scm, tests/substitute-binary.scm: Adjust accordingly.
2014-07-18guix-register: Add '--state-directory' parameter.Ludovic Courtès
* nix/guix-register/guix-register.cc (GUIX_OPT_STATE_DIRECTORY): New macro. (parse_opt): Honor it. * tests/guix-register.sh: Add test with '--state-directory'. * guix/store.scm (register-path): Add #:state-directory parameter.
2014-05-27store: Work around 'get-bytevector-n' bug that affects 'import-paths'.Ludovic Courtès
Fixes <http://bugs.gnu.org/17591>. * guix/store.scm (process-stderr) <%stderr-read>: Use 'get-bytevector-n!' instead of 'get-bytevector-n'.
2014-05-25store: Remove misleading 'setsockopt' call.Ludovic Courtès
* guix/store.scm (open-connection): Remove misleading 'setsockopt' call, erroneously introduced in df1fab58. This would actually shrink the receive buffer from 124 KiB to 12 KiB, though it had little impact on performance.