Age | Commit message (Collapse) | Author |
|
|
|
This is useful for debugging.
|
|
|
|
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.
|
|
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 :-)
|
|
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.
|
|
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.
|
|
Because of an outdated check for a timestamp of 0, we were calling
utime() even when it wasn't necessary.
|
|
|
|
This fixes the error message
error: file `' was not found in the Nix search path (add it using $NIX_PATH or -I)
|
|
|
|
EvalState::eval(). This gives a 12% speedup on ‘nix-instantiate
/etc/nixos/nixos/ -A system --readonly-mode’ (from 1.01s to 0.89s).
|
|
|
|
|
|
attributes.
|
|
This makes it easier to pinpoint the source of a crash.
|
|
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.
|
|
and allocate them only once.
* Move Value and related functions into value.hh.
|
|
|
|
/etc/nixos/nixos -A system" spent about 10% of its time in
dynamic_cast.
|
|
|
|
file.
|
|
|
|
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.
|
|
and ‘--realise’ actions).
|
|
|
|
|
|
necessary because existing code assumes that the references graph is
acyclic.
|
|
|
|
through the build hook.
|
|
|
|
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.
|
|
|
|
|
|
Since it's rarely used and fixing it is too much work right now,
just document it.
|
|
It doesn't detect indirect references
|
|
There is probably a more efficient way to do this.
|
|
|
|
|
|
|
|
stream it's now necessary for the daemon to process the entire
sequence of exported paths, rather than letting the client do it.
|
|
|
|
(way fewer roundtrips) by allowing the client to send data in bigger
chunks.
* Some refactoring.
|
|
|
|
* 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).
|
|
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).
|
|
system calls / context switches when dumping a NAR and in the worker
protocol.
|
|
of Berkeley DB (see r8632).
|
|
|
|
rather than complain about them.
|