about summary refs log tree commit diff
path: root/src/libstore/store.cc
AgeCommit message (Collapse)AuthorFilesLines
2006-06-01 * Minor cleanup.Eelco Dolstra1-7/+3
2006-05-11 * 64-bit compatibility fixes (for problems revealed by building on an AthlonEelco Dolstra1-2/+2
64 running 64-bit SUSE). A patched ATerm library is required to run Nix succesfully.
2006-03-10 * Allow `make check' to work in directories that have symlinkEelco Dolstra1-0/+20
components.
2006-03-01 * Close the database before the destructor runs.Eelco Dolstra1-0/+7
2006-02-16 * Allow the size of the GC reserved file to be specified in nix.confEelco Dolstra1-2/+4
through the new `gc-reserved-space' option.
2006-02-16 * A simple hack to fix NIX-18: the garbage collector cannot run whenEelco Dolstra1-1/+15
the disk is full (because to delete something from the Nix store, we need a Berkeley DB transaction, which takes up disk space). Under normal operation, we make sure that there exists a file /nix/var/nix/db/reserved of 1 MB. When running the garbage collector, we delete that file before we open the Berkeley DB environment.
2005-12-25 * Hack around a GCC 2.95 bug.Eelco Dolstra1-2/+2
2005-12-24 * GCC 2.95 compatibility.Eelco Dolstra1-1/+1
2005-12-15 * `nix-store --gc' prints out the number of bytes freed on stdoutEelco Dolstra1-2/+3
(even when it is interrupted by a signal).
2005-12-15 * Split the database upgrade into multiple transactions to preventEelco Dolstra1-2/+11
Berkeley DB from running out of locks.
2005-12-13 * Change `referer' to `referrer' throughout. In particular, theEelco Dolstra1-32/+32
nix-store query options `--referer' and `--referer-closure' have been changed to `--referrer' and `--referrer-closure' (but the old ones are still accepted for compatibility).
2005-12-12 * Automatically delete the old referers table.Eelco Dolstra1-1/+5
2005-12-12 * Fix NIX-23: quadratic complexity in maintaining the referersEelco Dolstra1-28/+81
mapping. The referer table is replaced by a referrer table (note spelling fix) that stores each referrer separately. That is, instead of having referer[P] = {Q_1, Q_2, Q_3, ...} we store referer[(P, Q_1)] = "" referer[(P, Q_2)] = "" referer[(P, Q_3)] = "" ... To find the referrers of P, we enumerate over the keys with a value lexicographically greater than P. This requires the referrer table to be stored as a B-Tree rather than a hash table. (The tuples (P, Q) are stored as P + null-byte + Q.) Old Nix databases are upgraded automatically to the new schema.
2005-10-29 * Repair the referers table from the references table.Rob Vermaas1-0/+3
2005-05-07 * Don't try to register GC roots in read-only mode.Eelco Dolstra1-2/+2
2005-05-04 * Idem (constness fix).Eelco Dolstra1-2/+2
* `compare' in GCC 2.95 is broken.
2005-04-12 * Garbage collector fix: allow deletion of paths that have invalidEelco Dolstra1-4/+4
(but substitutable) referers.
2005-04-07 * `nix-store --add-fixed' to preload the outputs of fixed-outputEelco Dolstra1-2/+59
derivations. This is mostly to simplify the implementation of nix-prefetch-{url, svn}, which now work properly in setuid installations. * Enforce valid store names in `nix-store --add / --add-fixed'.
2005-03-25 * `nix-store --verify': repair bad referer mappings.Eelco Dolstra1-6/+16
2005-03-23 * `nix-store --register-validity': allow a path to refer to a pathEelco Dolstra1-13/+37
listed later in the list of new valid paths.
2005-03-23 * nix-store: `--isvalid' -> `--check-validity', `--validpath' ->Eelco Dolstra1-1/+1
`--register-validity'. * `nix-store --register-validity': read arguments from stdin, and allow the references and deriver to be set.
2005-03-14 * Bug in clearSubstitutes().Eelco Dolstra1-1/+2
2005-03-03 * Don't use fork() in copyPath(), but a string buffer.Eelco Dolstra1-47/+14
2005-03-03 * Increase Berkeley DB limits a bit more.Eelco Dolstra1-4/+23
* Maintain the cleanup invariant in clearSubstitutes().
2005-03-02 * `nix-store -q --hash' to quickly query the hash of the contents of aEelco Dolstra1-0/+8
store path (which is stored in the database).
2005-02-14 * Type error in constructor call (caught by GCC 3.3, but not 3.4!).Eelco Dolstra1-1/+1
2005-02-09 * Commit more often to prevent out-of-memory errors.Eelco Dolstra1-0/+9
2005-02-09 * Propagate the deriver of a path through the substitute mechanism.Eelco Dolstra1-5/+12
* Removed some dead code (successor stuff) from nix-push. * Updated terminology in the tests (store expr -> drv path). * Check that the deriver is set properly in the tests.
2005-02-09 * Automatically upgrade <= 0.7 Nix stores to the new schema (so thatEelco Dolstra1-20/+133
existing user environments continue to work). * `nix-store --verify': detect incomplete closures.
2005-02-08 * Subflag in `--verify': `nix-store --verify --check-contents' checksEelco Dolstra1-9/+35
that the contents of store paths has not changed by comparing hashes of their current contents to the hashes stored in the database.
2005-02-08 * Updated `nix-store --verify' to the new schema.Eelco Dolstra1-17/+95
2005-02-07 * `nix-store -qb' to query derivation environment bindings. UsefulEelco Dolstra1-2/+20
for finding build-time dependencies (possibly after a build). E.g., $ nix-store -qb aterm $(nix-store -qd $(which strc)) /nix/store/jw7c7s65n1gwhxpn35j9rgcci6ilzxym-aterm-2.3.1 * Arguments to nix-store can be files within store objects, e.g., /nix/store/jw7c...-aterm-2.3.1/bin/baffle. * Idem for garbage collector roots.
2005-02-07 * Maintain a database table (`derivers') that maps output paths to theEelco Dolstra1-7/+44
derivation that produced them. * `nix-store -qd PATH' prints out the derivation that produced a path.
2005-02-01 * nix-store, nix-instantiate: added an option `--add-root' toEelco Dolstra1-3/+3
immediately add the result as a permanent GC root. This is the only way to prevent a race with the garbage collector. For instance, the old style ln -s $(nix-store -r $(nix-instantiate foo.nix)) \ /nix/var/nix/gcroots/result has two time windows in which the garbage collector can interfere (by GC'ing the derivation and the output, respectively). On the other hand, nix-store --add-root /nix/var/nix/gcroots/result -r \ $(nix-instantiate --add-root /nix/var/nix/gcroots/drv \ foo.nix) is safe. * nix-build: use `--add-root' to prevent GC races.
2005-02-01 * Add missing files to dist.Eelco Dolstra1-1/+4
* Fix GC and substitute bugs related to self-references. Add a regression test.
2005-01-31 * Topologically sort paths under the references relation to ensureEelco Dolstra1-3/+7
that they are deleted in an order that maintains the closure invariant. * Presence of a path in a temporary roots file does not imply that all paths in its closure are also present, so add the closure.
2005-01-31 * Start of concurrent garbage collection. Processes write temporaryEelco Dolstra1-0/+5
roots to a per-process temporary file in /nix/var/nix/temproots while holding a write lock on that file. The garbage collector acquires read locks on all those files, thus blocking further progress in other Nix processes, and reads the sets of temporary roots.
2005-01-28 * Only invalidate paths when they are in fact valid.Eelco Dolstra1-1/+2
2005-01-27 * Fix deadlock.Eelco Dolstra1-1/+1
2005-01-27 * Update referers mappings when updating/clearing the referencesEelco Dolstra1-7/+27
mapping. * Do things in the right order in invalidatePath().
2005-01-27 * Fix and simplify the garbage collector (it's still not concurrent,Eelco Dolstra1-2/+9
though). In particular it's now much easier to register a GC root. Just place a symlink to whatever store path it is that you want to keep in /nix/var/nix/gcroots.
2005-01-25 * Maintain the references/referers relation also for derivations.Eelco Dolstra1-14/+32
This simplifies garbage collection and `nix-store --query --requisites' since we no longer need to treat derivations specially. * Better maintaining of the invariants, e.g., setReferences() can only be called on a valid/substitutable path.
2005-01-25 * Simplification: registerSubstitutes -> registerSubstitute. We noEelco Dolstra1-16/+9
longer need the former since there we no longer have the substitutes-rev table (which triggered a O(n^2) cost in updating them).
2005-01-25 * Really fix the substitute mechanism, i.e., ensure the closureEelco Dolstra1-4/+4
invariant by registering references through the manifest. * Added a test for nix-pull.
2005-01-20 * Terminology fixes.Eelco Dolstra1-1/+1
2005-01-19 * Nix-store queries `--references' and `referers' to query the pointerEelco Dolstra1-0/+10
graph. That is, `nix-store --query --references PATH' shows the set of paths referenced by PATH, and `nix-store --query --referers PATH' shows the set of paths referencing PATH.
2005-01-19 * Renamed `normalise.cc' -> `build.cc', `storeexprs.cc' ->Eelco Dolstra1-6/+66
`derivations.cc', etc. * Store the SHA-256 content hash of store paths in the database after they have been built/added. This is so that we can check whether the store has been messed with (a la `rpm --verify'). * When registering path validity, verify that the closure property holds.
2005-01-19 * Change extension `.store' to `.drv'.Eelco Dolstra1-0/+2
* Re-enable `nix-store --query --requisites'.
2005-01-19 * Started removing closure store expressions, i.e., the explicitEelco Dolstra1-135/+28
representation of closures as ATerms in the Nix store. Instead, the file system pointer graph is now stored in the Nix database. This has many advantages: - It greatly simplifies the implementation (we can drop the notion of `successors', and so on). - It makes registering roots for the garbage collector much easier. Instead of specifying the closure expression as a root, you can simply specify the store path that must be retained as a root. This could not be done previously, since there was no way to find the closure store expression containing a given store path. - Better traceability: it is now possible to query what paths are referenced by a path, and what paths refer to a path.
2005-01-17 * Removed the `id' attribute hack.Eelco Dolstra1-5/+5
* Formalise the notion of fixed-output derivations, i.e., derivations for which a cryptographic hash of the output is known in advance. Changes to such derivations should not propagate upwards through the dependency graph. Previously this was done by specifying the hash component of the output path through the `id' attribute, but this is insecure since you can lie about it (i.e., you can specify any hash and then produce a completely different output). Now the responsibility for checking the output is moved from the builder to Nix itself. A fixed-output derivation can be created by specifying the `outputHash' and `outputHashAlgo' attributes, the latter taking values `md5', `sha1', and `sha256', and the former specifying the actual hash in hexadecimal or in base-32 (auto-detected by looking at the length of the attribute value). MD5 is included for compatibility but should be considered deprecated. * Removed the `drvPath' pseudo-attribute in derivation results. It's no longer necessary. * Cleaned up the support for multiple output paths in derivation store expressions. Each output now has a unique identifier (e.g., `out', `devel', `docs'). Previously there was no way to tell output paths apart at the store expression level. * `nix-hash' now has a flag `--base32' to specify that the hash should be printed in base-32 notation. * `fetchurl' accepts parameters `sha256' and `sha1' in addition to `md5'. * `nix-prefetch-url' now prints out a SHA-1 hash in base-32. (TODO: a flag to specify the hash.)