about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-11-19 nix-store -r: Don't quietly ignore missing pathsEelco Dolstra1-0/+1
2012-11-15 Revert "prim_toPath: Actually make the string a path"Eelco Dolstra1-3/+1
This reverts commit 2980d1fba97069805c3649c5d99d0356bce6c303. It causes a regression in NixOS evaluation: string `/nix/store/ya3s5gmj3b28170fpbjhgsk8wzymkpa1-pommed-1.39/etc/pommed.conf' cannot refer to other paths
2012-11-15 Disable use of vfork()Eelco Dolstra1-1/+1
vfork() is just too weird. For instance, in this build: http://hydra.nixos.org/build/3330487 the value fromHook.writeSide becomes corrupted in the parent, even though the child only reads from it. At -O0 the problem goes away. Probably the child is overriding some spilled temporary variable. If I get bored I may implement using posix_spawn() instead.
2012-11-15 Don't use std::cerr in a few placesEelco Dolstra5-30/+34
Slightly scared of using std::cerr in a vforked process...
2012-11-15 Add some debug codeEelco Dolstra1-1/+1
2012-11-09 Use vfork() instead of fork() if availableEelco Dolstra5-22/+47
Hopefully this reduces the chance of hitting ‘unable to fork: Cannot allocate memory’ errors. vfork() is used for everything except starting builders.
2012-11-09 Remove definition of non-existant functionEelco Dolstra1-2/+0
2012-11-09 Remove some redundant close() callsEelco Dolstra3-18/+8
They are unnecessary because we set the close-on-exec flag.
2012-11-09 Remove the quickExit functionEelco Dolstra4-18/+8
2012-11-09 Remove a Darwin hack that should no longer be neededEelco Dolstra1-7/+0
2012-11-09 Fix a segfault when auto-calling a "a@{...}" functionEelco Dolstra1-5/+5
Since the called function can return its argument attribute set (e.g. "a"), the latter should not be allocated on the stack. Reported by Shea.
2012-11-09 Don't start copy-from-other-stores if $NIX_OTHER_STORES is unsetEelco Dolstra1-1/+2
Slight optimisation.
2012-11-09 Remove unnecessary call to closeMostFDs()Eelco Dolstra1-1/+0
We have close-on-exec on all FDs now, and there is no security risk in passing open FDs to substituters anyway.
2012-11-06 canonicalizePathMetaData: Fall-back to utimes if lutimes fails due to ENOSYSShea Levy1-0/+2
2012-10-23 If hashes do not match, print them in base-32 for SHA-1/SHA-256Eelco Dolstra3-1/+10
Fixes #57.
2012-10-23 prim_toPath: Actually make the string a pathShea Levy1-1/+3
2012-10-11 Shorten the names of temporary build directoriesEelco Dolstra1-1/+1
2012-10-04 getDerivation(): Don't always quietly ignore assertion failureEelco Dolstra5-21/+27
Ignoring assertion failures makes some sense for nix-env -qa, but not for nix-instantiate/nix-build or hydra-eval-jobs.
2012-10-04 XML writer: flush after newlinesEelco Dolstra1-4/+4
This is useful for hydra-eval-jobs.
2012-10-04 nix-store --verify: Continue on errorsEelco Dolstra1-2/+4
2012-10-04 Fix regular expressionEelco Dolstra1-1/+1
http://hydra.nixos.org/build/3123177
2012-10-03 Rename nix-worker to nix-daemonEelco Dolstra4-16/+19
2012-10-03 Drop support for running nix-worker in "slave" modeEelco Dolstra4-136/+7
AFAIK nobody uses this, setuid binaries are evil, and there is no good reason why people can't just run the daemon.
2012-10-03 Remove bin2cEelco Dolstra5-31/+4
2012-10-03 When ‘--help’ is given, just run ‘man’ to show the manual pageEelco Dolstra17-240/+23
I.e. do what git does. I'm too lazy to keep the builtin help text up to date :-) Also add ‘--help’ to various commands that lacked it (e.g. nix-collect-garbage).
2012-10-03 nix-env: Support ‘--repair’ flagEelco Dolstra3-5/+9
2012-10-03 Add a ‘--repair’ flag to nix-instantiateEelco Dolstra11-25/+36
This allows repairing corrupted derivations and other source files.
2012-10-03 Handle repairing paths that are in build-chroot-dirsEelco Dolstra1-0/+7
2012-10-03 When repairing a derivation, check and repair the entire output closureEelco Dolstra3-6/+91
If we find a corrupted path in the output closure, we rebuild the derivation that produced that particular path.
2012-10-02 Add a --repair flag to ‘nix-store -r’ to repair derivation outputsEelco Dolstra7-64/+116
With this flag, if any valid derivation output is missing or corrupt, it will be recreated by using a substitute if available, or by rebuilding the derivation. The latter may use hash rewriting if chroots are not available.
2012-10-02 nix-store -r: Get rid of an unnecessary call to buildPaths/ensurePathsEelco Dolstra1-4/+4
2012-10-02 nix-store --verify: Add an option ‘--repair’ to repair all ↵Eelco Dolstra3-10/+30
missing/corrupt paths Also, return a non-zero exit code if errors remain after verifying/repairing.
2012-10-02 Add operation ‘nix-store --repair-path’Eelco Dolstra3-28/+88
This operation allows fixing corrupted or accidentally deleted store paths by redownloading them using substituters, if available. Since the corrupted path cannot be replaced atomically, there is a very small time window (one system call) during which neither the old (corrupted) nor the new (repaired) contents are available. So repairing should be used with some care on critical packages like Glibc.
2012-09-28 Handle octal escapes in /proc/self/mountinfoEelco Dolstra3-2/+24
2012-09-28 Print a more descriptive error message if setting up the build environment failsEelco Dolstra1-3/+14
2012-09-27 Allow dashes in identifiersEelco Dolstra1-1/+1
In Nixpkgs, the attribute in all-packages.nix corresponding to a package is usually equal to the package name. However, this doesn't work if the package contains a dash, which is fairly common. The convention is to replace the dash with an underscore (e.g. "dbus-lib" becomes "dbus_glib"), but that's annoying. So now dashes are valid in variable / attribute names, allowing you to write: dbus-glib = callPackage ../development/libraries/dbus-glib { }; and buildInputs = [ dbus-glib ]; Since we don't have a negation or subtraction operation in Nix, this is unambiguous.
2012-09-25 Make the store writable before creating /nix/store/.linksEelco Dolstra1-2/+1
2012-09-25 Merge branch 'readonly-store'Eelco Dolstra14-135/+106
2012-09-25 Include <sys/types.h> for off_tEelco Dolstra1-0/+1
Reported by "gio" on IRC.
2012-09-19 Remove setting of the immutable bitEelco Dolstra5-96/+35
Using the immutable bit is problematic, especially in conjunction with store optimisation. For instance, if the garbage collector deletes a file, it has to clear its immutable bit, but if the file has additional hard links, we can't set the bit afterwards because we don't know the remaining paths. So now that we support having the entire Nix store as a read-only mount, we may as well drop the immutable bit. Unfortunately, we have to keep the code to clear the immutable bit for backwards compatibility.
2012-09-19 Support having /nix/store as a read-only bind mountEelco Dolstra2-0/+41
It turns out that the immutable bit doesn't work all that well. A better way is to make the entire Nix store a read-only bind mount, i.e. by doing $ mount --bind /nix/store /nix/store $ mount -o remount,ro,bind /nix/store (This would typically done in an early boot script, before anything from /nix/store is used.) Since Nix needs to be able to write to the Nix store, it now detects if /nix/store is a read-only bind mount and then makes it writable in a private mount namespace.
2012-09-19 Templatise tokenizeString()Eelco Dolstra10-39/+30
2012-09-18 Keep build directory if not all expected outputs were producedEelco Dolstra1-3/+3
Fixes issue #123 in Nixpkgs.
2012-09-13 nix-env --delete-generations: Support --dry-run flagEelco Dolstra1-5/+10
Fixes #43.
2012-09-13 RemoteStore::connectToDaemon(): Set close-on-exec flagEelco Dolstra1-0/+1
This ensures that "nix-build --run-env" doesn't keep a connection to the worker open, preventing it from exiting.
2012-09-13 Vacuum the SQLite DB after running the garbage collectorEelco Dolstra3-0/+12
2012-09-13 Delete paths in a component in topologically sorted orderEelco Dolstra1-1/+3
The outputs of a derivation can refer to each other (even though they cannot have cycles), so they have to be deleted in the right order. http://hydra.nixos.org/build/3026118
2012-09-13 Disable auto store optimisation for nowEelco Dolstra1-1/+1
I've seen operations like "nix-store --import" take much longer on one system. So default to off until I've investigated this a bit further.
2012-09-13 In startBuilder(), only print the new paths we're buildingEelco Dolstra1-2/+3
2012-09-12 Handle gc-keep-outputs and gc-keep-derivations both enabledEelco Dolstra1-94/+97
If the options gc-keep-outputs and gc-keep-derivations are both enabled, you can get a cycle in the liveness graph. There was a hack to handle this, but it didn't work with multiple-output derivations, causing the garbage collector to fail with errors like ‘error: cannot delete path `...' because it is in use by `...'’. The garbage collector now handles strongly connected components in the liveness graph as a unit and decides whether to delete all or none of the paths in an SCC.