about summary refs log tree commit diff
path: root/src/libstore
AgeCommit message (Collapse)AuthorFilesLines
2012-09-18 Keep build directory if not all expected outputs were producedEelco Dolstra1-3/+3
Fixes issue #123 in Nixpkgs.
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.
2012-09-12 Build hook: Pass the timeout to the remote builderEelco Dolstra1-1/+1
Note that this will only work if the client has a very recent Nix version (post 15e1b2c223494ecb5efefc3ea0e3b926a6b1d7dc), otherwise the --option flag will just be ignored. Fixes #50.
2012-09-11 Fix "non-zero padding" errorEelco Dolstra1-1/+2
Probably it's not a good idea to pass a temporary object to StringSource.
2012-09-11 Support building a derivation if some outputs are already valid (non-chroot ↵Eelco Dolstra1-11/+67
case) This uses scary hash rewriting. Fixes #21.
2012-09-11 Remove debug lineEelco Dolstra1-3/+1
2012-09-11 Support building a derivation if some outputs are already validEelco Dolstra1-12/+16
This handles the chroot and build hook cases, which are easy. Supporting the non-chroot-build case will require more work (hash rewriting!). Issue #21.
2012-09-11 Include config.h before any other headerEelco Dolstra1-2/+2
"config.h" must be included first, because otherwise the compiler might not see the right value of _FILE_OFFSET_BITS. We've had this before; see 705868a8a96a10f70e629433cfffc2d5cd2703eb. In this case, GCC would compute a different address for ‘settings.useSubstitutes’ in misc.cc because of the off_t in ‘settings’. Reverts 3854fc9b42d16b810f62b64194b699033b03aaf1. http://hydra.nixos.org/build/3016700
2012-08-27 Fix stupid type error in calling std::maxEelco Dolstra1-1/+1
2012-08-27 Merge branch 'master' into no-manifestsEelco Dolstra7-64/+103
2012-08-20 Check if MS_PRIVATE is definedEelco Dolstra1-1/+1
http://hydra.nixos.org/build/2955671
2012-08-20 In the chroot, make all mounted filesystems privateEelco Dolstra1-0/+18
This is required on systemd, which mounts filesystems as "shared" subtrees. Changes to shared trees in a private mount namespace are propagated to the outside world, which is bad.
2012-08-20 Don't bind-mount /proc since we mount our ownEelco Dolstra1-2/+2
2012-08-19 Fix 1755 permission on temporary directories left behind by ‘-K’Eelco Dolstra1-4/+4
2012-08-07 Don't warn about maximum link count exceeded on 0-byte filesEelco Dolstra1-2/+4
2012-08-05 Handle amount of disk space saved by hard linking being negativeEelco Dolstra1-2/+2
Fixes bogus messages like "currently hard linking saves 17592186044416.00 MiB".
2012-08-05 Fix race condition when two processes create a hard link to a file in .linksEelco Dolstra1-27/+37
This is a problem because one process may set the immutable bit before the second process has created its link. Addressed random Hydra failures such as: error: cannot rename `/nix/store/.tmp-link-17397-1804289383' to `/nix/store/rsvzm574rlfip3830ac7kmaa028bzl6h-nixos-0.1pre-git/upstart-interface-version': Operation not permitted
2012-08-05 Fix race condition when two processes create the same link in /nix/store/.linksEelco Dolstra1-4/+4
2012-08-01 Count bytes freed deleting unused linksEelco Dolstra2-3/+5
2012-08-01 Drop the block count in the garbage collectorEelco Dolstra5-16/+9
2012-08-01 nix-store --gc: Make ‘--max-freed 0’ do the right thingEelco Dolstra3-6/+5
That is, delete almost nothing (it will still remove unused links from /nix/store/.links).
2012-08-01 removeUnusedLinks(): Print stats on disk space saved by hard linkingEelco Dolstra1-1/+16
2012-08-01 Merge branch 'master' into no-manifestsEelco Dolstra1-1/+4
2012-08-01 DohEelco Dolstra1-1/+2
2012-08-01 Make ‘nix-store --optimise’ interruptibleEelco Dolstra1-0/+2
2012-08-01 Report substituter errors to clients of the Nix daemonEelco Dolstra2-22/+38
2012-07-31 Prevent an injection attack in passing untrusted options to substitutersEelco Dolstra1-0/+4
2012-07-31 Pass all --option flags to the daemonEelco Dolstra3-3/+22
2012-07-31 Add an option ‘build-fallback’ (equivalent to the --fallback flag)Eelco Dolstra1-1/+2
2012-07-30 Refactor settings processingEelco Dolstra11-428/+475
Put all Nix configuration flags in a Settings object.
2012-07-30 WhitespaceEelco Dolstra2-22/+22
2012-07-30 Pass configuration settings to the substitutersEelco Dolstra4-5/+28
Previously substituters could read nix.conf themselves, but this didn't take --option flags into account.
2012-07-30 Remove unused variablesEelco Dolstra2-5/+0
2012-07-30 Fix whitespaceEelco Dolstra1-71/+71
2012-07-27 Let build.cc verify the expected hash of a substituter's outputEelco Dolstra1-6/+33
Since SubstitutionGoal::finished() in build.cc computes the hash anyway, we can prevent the inefficiency of computing the hash twice by letting the substituter tell Nix about the expected hash, which can then verify it.
2012-07-27 Remove more tabsEelco Dolstra1-9/+9
2012-07-27 Remove trailing whitespace / tabsEelco Dolstra1-130/+130
2012-07-26 Fix the substituter testsEelco Dolstra1-1/+2
2012-07-26 Merge branch 'master' into no-manifestsEelco Dolstra13-160/+199
2012-07-26 Set permissions on temporary build directories to 0700Eelco Dolstra1-1/+2
Fixes #39.
2012-07-23 Handle platforms that don't support linking to a symlinkEelco Dolstra1-2/+7
E.g. Darwin doesn't allow this.
2012-07-23 Unlink the right fileEelco Dolstra1-2/+2
2012-07-23 Garbage collect unused links in /nix/store/.linksEelco Dolstra2-0/+39
Incremental optimisation requires creating links in /nix/store/.links to all files in the store. However, this means that if we delete a store path, no files are actually deleted because links in /nix/store/.links still exists. So we need to check /nix/store/.links for files with a link count of 1 and delete them.
2012-07-23 Automatically optimise the Nix store when a new path is addedEelco Dolstra4-9/+31
Auto-optimisation is enabled by default. It can be turned off by setting auto-optimise-store to false in nix.conf.
2012-07-23 optimiseStore(): Use a content-addressed file store in /nix/store/.linksEelco Dolstra2-107/+108
optimiseStore() now creates persistent, content-addressed hard links in /nix/store/.links. For instance, if it encounters a file P with hash H, it will create a hard link P' = /nix/store/.link/<H> to P if P' doesn't already exist; if P' exist, then P is replaced by a hard link to P'. This is better than the previous in-memory map, because it had the tendency to unnecessarily replace hard links with a hard link to whatever happened to be the first file with a given hash it encountered. It also allows on-the-fly, incremental optimisation.