summaryrefslogtreecommitdiff
path: root/guix/store.scm
AgeCommit message (Collapse)Author
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.
2014-05-21store: Flush the output when the build process emits '\r'.Ludovic Courtès
This allows progress reports emitted by 'substitute-binary' to be correctly displayed. * guix/store.scm (%newlines): New variable. (process-stderr) <%stderr-next>: Flush (current-build-output-port) when S contains one of %NEWLINES.
2014-05-18store: Change #:store parameter to #:prefix.Ludovic Courtès
* guix/store.scm (register-path): Change #:store to #:prefix.
2014-05-17store: Add #:store parameter to 'register-path'.Ludovic Courtès
* guix/store.scm (register-path): Add #:store and honor it.
2014-04-28store: (direct-store-path? (%store-prefix)) returns #f.Ludovic Courtès
* guix/store.scm (direct-store-path?): Return #f if PATH is (%store-prefix). * tests/store.scm ("direct-store-path?"): Add test.
2014-04-12store: Add 'add-permanent-root' and 'remove-permanent-root'.Ludovic Courtès
* guix/store.scm (add-indirect-root): Improve docstring. (%gc-roots-directory): New variable. (add-permanent-root, remove-permanent-root): New procedures. * tests/store.scm ("permanent root"): New test.
2014-03-14store: Add 'hash-part->path'.Ludovic Courtès
* guix/store.scm (hash-part->path): New procedure. * tests/store.scm ("hash-part->path"): New test.
2014-03-09store: Add #:timeout build option.Ludovic Courtès
* guix/serialization.scm (write-string-pairs): New procedure. * guix/store.scm (write-arg): Add 'string-pairs' case. (set-build-options): Add 'timeout' keyword parameter. Honor it. * tests/derivations.scm ("build-expression->derivation and timeout"): New test.
2014-03-09build: Change state and log directories to $localstatedir/.../guix.Ludovic Courtès
* daemon.am (libstore_a_CPPFLAGS): Change /nix to /guix. * guix/config.scm.in (%state-directory): Likewise. * guix/store.scm (log-file): Likewise.
2014-03-07store: 'export-paths' doesn't export references of the given files.Ludovic Courtès
This fixes a regression introduced in 99fbddf9a623757e39d88bfb431f8f7d6f24b75b ("store: Change 'export-paths' to always export in topological order.") * guix/store.scm (export-paths): Define 'ordered' variable. Iterate over it. * tests/store.scm ("export/import paths, ensure topological order"): Add 'file0'. Adjust accordingly.
2014-02-27store: Use 'when' instead of 'if' in effectful context.Ludovic Courtès
* guix/store.scm (set-build-options): Use 'when' instead of 'if'.
2014-02-12store: Add comments for the stracer.Ludovic Courtès
* guix/store.scm (%worker-magic-1, %worker-magic-2): Add comments.
2014-02-10store: Change 'export-paths' to always export in topological order.Ludovic Courtès
* guix/store.scm (export-paths): Pass PATHS through 'topologically-sorted' before iterating. * tests/store.scm ("export/import paths, ensure topological order"): New test.
2014-01-24store: Add 'topologically-sorted'.Ludovic Courtès
* guix/store.scm (topologically-sorted): New procedure. * tests/store.scm ("topologically-sorted, one item", "topologically-sorted, several items", "topologically-sorted, more difficult"): New tests.