about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-03-13 Ensure that Perl processes delete their entry in the temproots directoryEelco Dolstra4-17/+12
By moving the destructor object to libstore.so, it's also run when download-using-manifests and nix-prefetch-url exit. This prevents them from cluttering /nix/var/nix/temproots with stale files.
2012-03-05 Fix compilation on FreeBSDEelco Dolstra2-0/+2
http://hydra.nixos.org/build/2213576 Not sure why compilation doesn't fail on other platforms...
2012-03-05 Set the close-on-exec flag on file descriptorsEelco Dolstra5-3/+20
2012-03-05 Don't leak a file descriptor in commonChildInit()Eelco Dolstra1-0/+1
2012-03-05 nix-worker: put the pid of the caller in argv[1]Eelco Dolstra3-2/+25
This is useful for debugging.
2012-03-05 Restore progress indication during nix-copy-closureEelco Dolstra1-0/+2
2012-03-01 Remove dependency on sqlite3_table_column_metadataEelco Dolstra1-7/+0
Not all SQLite builds have the function sqlite3_table_column_metadata. We were only using it in a schema upgrade check for compatibility with databases that were probably never seen in the wild. So remove it.
2012-03-01 Fix an uninitialised variableEelco Dolstra1-0/+1
The variable ‘useChroot’ was not initialised properly. This caused random failures if using the build hook. Seen on Mac OS X 10.7 with Clang. Thanks to KolibriFX for finding this :-)
2012-02-18 Fix chroots buildsEelco Dolstra1-0/+16
Chroots are initialised by hard-linking inputs from the Nix store to the chroot. This doesn't work if the input has its immutable bit set, because it's forbidden to create hard links to immutable files. So temporarily clear the immutable bit when creating and destroying the chroot. Note that making regular files in the Nix store immutable isn't very reliable, since the bit can easily become cleared: for instance, if we run the garbage collector after running ‘nix-store --optimise’. So maybe we should only make directories immutable.
2012-02-15 On Linux, make the Nix store really read-only by using the immutable bitEelco Dolstra6-4/+122
I was bitten one time too many by Python modifying the Nix store by creating *.pyc files when run as root. On Linux, we can prevent this by setting the immutable bit on files and directories (as in ‘chattr +i’). This isn't supported by all filesystems, so it's not an error if setting the bit fails. The immutable bit is cleared by the garbage collector before deleting a path. The only tricky aspect is in optimiseStore(), since it's forbidden to create hard links to an immutable file. Thus optimiseStore() temporarily clears the immutable bit before creating the link.
2012-02-15 Fix a broken guard around utime()Eelco Dolstra1-2/+5
Because of an outdated check for a timestamp of 0, we were calling utime() even when it wasn't necessary.
2012-02-15 Don't use deletePath() to delete a single fileEelco Dolstra1-1/+1
2012-02-09 Fix error messageEelco Dolstra1-3/+4
This fixes the error message error: file `' was not found in the Nix search path (add it using $NIX_PATH or -I)
2012-02-09 Use data() instead of c_str() where appropriateEelco Dolstra9-18/+18
2012-02-04 * Inline some functions and get rid of the indirection throughEelco Dolstra7-116/+94
EvalState::eval(). This gives a 12% speedup on ‘nix-instantiate /etc/nixos/nixos/ -A system --readonly-mode’ (from 1.01s to 0.89s).
2012-02-04 * Print elapsed evaluation time.Eelco Dolstra1-1/+9
2012-01-26 * Fix importing a derivation. This gave a segfault.Eelco Dolstra1-8/+23
2012-01-19 * Allow comparisons between derivations by comparing the outPathEelco Dolstra1-2/+14
attributes.
2012-01-19 * Add some debug output to print the derivation name once it's known.Eelco Dolstra1-1/+4
This makes it easier to pinpoint the source of a crash.
2012-01-17 * Added a command ‘nix-store --print-env $drvpath’ that prints out theEelco Dolstra1-0/+35
environment of the given derivation in a format that can be sourced by the shell, e.g. $ eval "$(nix-store --print-env $(nix-instantiate /etc/nixos/nixpkgs -A pkg))" $ NIX_BUILD_TOP=/tmp $ source $stdenv/setup This is especially useful to reproduce the environment used to build a package outside of its builder for development purposes. TODO: add a nix-build option to do the above and fetch the dependencies of the derivation as well.
2012-01-07 * Don't create thunks for simple constants (integers, strings, paths)Eelco Dolstra5-133/+193
and allocate them only once. * Move Value and related functions into value.hh.
2012-01-04 * Remove dead code.Eelco Dolstra2-4/+0
2012-01-04 * Don't use dynamic_cast, it's very slow. "nix-instantiateEelco Dolstra3-24/+23
/etc/nixos/nixos -A system" spent about 10% of its time in dynamic_cast.
2012-01-03 * Drop the inefficient "Path" suffix in output attribute names.Eelco Dolstra1-3/+1
2012-01-03 * Move the implementation of the ‘derivation’ primop into a separateEelco Dolstra2-25/+3
file.
2012-01-03 * Sync with the trunk.Eelco Dolstra1-1/+1
2012-01-03 * Refactoring: Get rid of a few subdirectories in corepkgs/, and someEelco Dolstra1-1/+1
other simplifications. * Use <nix/...> to locate the corepkgs. This allows them to be overriden through $NIX_PATH. * Use bash's pipefail option in the NAR builder so that we don't need to create a temporary file.
2011-12-30 * Support multiple outputs in nix-store (specifically the ‘--query’Eelco Dolstra1-43/+63
and ‘--realise’ actions).
2011-12-30 * Oops.Eelco Dolstra1-1/+1
2011-12-30 * Move topoSortPaths() out of gc.cc.Eelco Dolstra2-36/+36
2011-12-30 * Reject a build if there is a cycle among the outputs. This isEelco Dolstra4-9/+24
necessary because existing code assumes that the references graph is acyclic.
2011-12-30 * Sync with the trunk.Eelco Dolstra5-21/+54
2011-12-25 * Make sure that lock files are cleaned up properly when buildingEelco Dolstra1-7/+7
through the build hook.
2011-12-22 * Oops.Eelco Dolstra1-1/+1
2011-12-22 * In the garbage collector, delete invalid paths before deletingEelco Dolstra3-12/+45
unreachable paths. This matters when using --max-freed etc.: unreachable paths could become reachable again, so it's nicer to keep them if there is "real" garbage to be deleted. Also, don't use readDirectory() but read the Nix store and delete invalid paths in parallel. This reduces GC latency on very large Nix stores.
2011-12-22 * Drop unnecessary call to canonPath() (nixStore is already canonical).Eelco Dolstra1-1/+1
2011-12-21 * Another case of lock file permissions being too liberal.Eelco Dolstra1-1/+1
2011-12-21 * The ‘foo.drvPath’ feature was already broken in read-only mode.Eelco Dolstra1-1/+2
Since it's rarely used and fixing it is too much work right now, just document it.
2011-12-21 Revert previous commitShea Levy1-9/+0
It doesn't detect indirect references
2011-12-21 Detect and reject mutually-referential outputsShea Levy1-0/+9
There is probably a more efficient way to do this.
2011-12-21 * Simplify the context handling logic.Eelco Dolstra1-24/+13
2011-12-20 * Fix the build.Eelco Dolstra2-2/+2
2011-12-16 * Sync with the trunk.Eelco Dolstra26-275/+461
2011-12-16 * importPath() -> importPaths(). Because of buffering of the inputEelco Dolstra10-57/+75
stream it's now necessary for the daemon to process the entire sequence of exported paths, rather than letting the client do it.
2011-12-16 * Avoid expensive conversions from char arrays to STL strings.Eelco Dolstra3-13/+25
2011-12-16 * Make the import operation through the daemon much more efficientEelco Dolstra6-44/+68
(way fewer roundtrips) by allowing the client to send data in bigger chunks. * Some refactoring.
2011-12-16 * Clean up exception handling.Eelco Dolstra2-3/+10
2011-12-15 * Refactoring: move sink/source buffering into separate classes.Eelco Dolstra8-90/+125
* Buffer the HashSink. This speeds up hashing a bit because it prevents lots of calls to the hash update functions (e.g. nix-hash went from 9.3s to 8.7s of user time on the closure of my /var/run/current-system).
2011-12-15 * Buffer reads in FdSource. Together with write buffering, thisEelco Dolstra2-10/+32
significantly cuts down the number of syscalls (e.g., for "nix-store -qR /var/run/current-system" via the daemon, it reduced the number of syscalls in the client from 29134 to 4766 and in the daemon from 44266 to 20666).
2011-12-14 * Buffer writes in FdSink. This significantly reduces the number ofEelco Dolstra4-14/+50
system calls / context switches when dumping a NAR and in the worker protocol.