about summary refs log tree commit diff
path: root/src/libstore/gc.cc
AgeCommit message (Collapse)AuthorFilesLines
2017-07-04 Support base-64 hashesEelco Dolstra1-1/+1
Also simplify the Hash API. Fixes #1437.
2017-05-16 Improve progress indicatorEelco Dolstra1-1/+1
2017-04-24 Remove debug statementEelco Dolstra1-1/+0
2017-04-20 Detect lsofEelco Dolstra1-3/+8
Also, don't use lsof on Linux since it's not needed. Fixes #1328.
2017-04-10 Minor cleanupEelco Dolstra1-1/+1
Also, possible fix for #1310 on 32-bit systems.
2017-01-16 AutoCloseDir: Use std::unique_ptrEelco Dolstra1-8/+8
2016-12-08 Don't delete .check directories of running buildsEelco Dolstra1-0/+5
We need to keep them around for diffoscope.
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-38/+38
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-38/+38
2016-09-21 printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra1-18/+18
2016-07-21 find-runtime-roots: fold into gc.ccShea Levy1-8/+108
2016-07-11 Modernize AutoCloseFDShea Levy1-17/+17
2016-06-09 Use O_CLOEXEC in most placesEelco Dolstra1-3/+2
2016-06-02 LocalStore: Allow the physical and logical store directories to differEelco Dolstra1-19/+20
This is primarily to subsume the functionality of the copy-from-other-stores substituter. For example, in the NixOS installer, we can now do (assuming we're in the target chroot, and the Nix store of the installation CD is bind-mounted on /tmp/nix): $ nix-build ... --option substituters 'local?state=/tmp/nix/var&real=/tmp/nix/store' However, unlike copy-from-other-stores, this also allows write access to such a store. One application might be fetching substitutes for /nix/store in a situation where the user doesn't have sufficient privileges to create /nix, e.g.: $ NIX_REMOTE="local?state=/home/alice/nix/var&real=/home/alice/nix/store" nix-build ...
2016-06-02 Allow setting the state directory as a store parameterEelco Dolstra1-19/+15
E.g. "local?store=/tmp/store&state=/tmp/var".
2016-06-01 Make the store directory a member variable of StoreEelco Dolstra1-8/+8
2016-05-04 More GC fixesEelco Dolstra1-5/+5
2016-04-25 Fix "path is not in the Nix store" during GCEelco Dolstra1-1/+1
2016-04-25 Improved logging abstractionEelco Dolstra1-1/+1
This also gets rid of --log-type, since the nested log type isn't useful in a multi-threaded situation, and nobody cares about the "pretty" log type.
2016-04-21 Fix test failuresEelco Dolstra1-1/+1
2016-04-19 Move path info caching from BinaryCacheStore to StoreEelco Dolstra1-2/+2
Caching path info is generally useful. For instance, it speeds up "nix path-info -rS /run/current-system" (i.e. showing the closure sizes of all paths in the closure of the current system) from 5.6s to 0.15s. This also eliminates some APIs like Store::queryDeriver() and Store::queryReferences().
2016-04-08 Make LocalStore thread-safeEelco Dolstra1-15/+16
Necessary for multi-threaded commands like "nix verify-paths".
2016-02-24 deletePath(): Succeed if path doesn't existEelco Dolstra1-1/+1
Also makes it robust against concurrent deletions.
2016-02-24 Eliminate reserveSpace flagEelco Dolstra1-0/+3
2016-02-11 Move addPermRoot into StoreEelco Dolstra1-4/+4
2016-02-04 StoreAPI -> StoreEelco Dolstra1-1/+1
Calling a class an API is a bit redundant...
2016-02-04 Eliminate the "store" global variableEelco Dolstra1-26/+23
Also, move a few free-standing functions into StoreAPI and Derivation. Also, introduce a non-nullable smart pointer, ref<T>, which is just a wrapper around std::shared_ptr ensuring that the pointer is never null. (For reference-counted values, this is better than passing a "T&", because the latter doesn't maintain the refcount. Usually, the caller will have a shared_ptr keeping the value alive, but that's not always the case, e.g., when passing a reference to a std::thread via std::bind.)
2015-07-17 OCD: foreach -> C++11 ranged forEelco Dolstra1-22/+21
2015-06-30 GC: Handle ENOSPC creating/moving to the trash directoryEelco Dolstra1-8/+23
Issue #564.
2015-03-06 Fix typos: s/the the/the/Daniel Hahler1-1/+1
2014-12-12 Ensure we're writing to stderr in the builderEelco Dolstra1-2/+2
http://hydra.nixos.org/build/17862041
2014-11-19 Disable vacuuming the DB after garbage collectionEelco Dolstra1-1/+1
Especially in WAL mode on a highly loaded machine, this is not a good idea because it results in a WAL file of approximately the same size ad the database, which apparently cannot be deleted while anybody is accessing it.
2014-11-19 Clean up temp roots in a more C++ wayEelco Dolstra1-26/+0
2014-11-04 nix-store --gc: Don't warn about missing manifests directoryEelco Dolstra1-1/+2
2014-10-03 Remove some duplicate codeEelco Dolstra1-6/+2
2014-08-20 Use proper quotes everywhereEelco Dolstra1-36/+36
2014-08-13 Use regular file GC roots if possibleEelco Dolstra1-1/+4
This makes hydra-eval-jobs create roots as regular files. See 1c208f2b7ef8ffb5e6d435d703dad83223a67bd6.
2014-08-01 findRoots(): Prevent a call to lstat()Eelco Dolstra1-9/+14
This means that getting the roots from /nix/var/nix/.../hydra-roots doesn't need any I/O other than reading the directory.
2014-08-01 Make readDirectory() return inode / file typeEelco Dolstra1-8/+6
2014-08-01 Allow regular files as GC rootsEelco Dolstra1-0/+6
If a root is a regular file, then its name must denote a store path. For instance, the existence of the file /nix/var/nix/gcroots/per-user/eelco/hydra-roots/wzc3cy1wwwd6d0dgxpa77ijr1yp50s6v-libxml2-2.7.7 would cause /nix/store/wzc3cy1wwwd6d0dgxpa77ijr1yp50s6v-libxml2-2.7.7 to be a root. This is useful because it involves less I/O (no need for a readlink() call) and takes up less disk space (the symlink target typically takes up a full disk block, while directory entries are packed more efficiently). This is particularly important for hydra.nixos.org, which has hundreds of thousands of roots, and where reading the roots can take 25 minutes.
2014-03-30 boost::shared_ptr -> std::shared_ptrEelco Dolstra1-3/+1
2014-02-27 Set up a minimal /dev in chrootsEelco Dolstra1-7/+5
Not bind-mounting the /dev from the host also solves the problem with /dev/shm being a symlink to something not in the chroot.
2014-01-21 Fix some clang warningsEelco Dolstra1-2/+0
2013-12-10 Garbage collector: Release locks on temporary root filesEelco Dolstra1-0/+1
This allows processes waiting for such locks to proceed during the trash deletion phase of the garbage collector.
2013-11-14 Remove nix-setuid-helperEelco Dolstra1-1/+1
AFAIK, nobody uses it, it's not maintained, and it has no tests.
2013-10-22 For auto roots, show the intermediate linkEelco Dolstra1-1/+1
I.e. "nix-store -q --roots" will now show (for example) /home/eelco/Dev/nixpkgs/result rather than /nix/var/nix/gcroots/auto/53222qsppi12s2hkap8dm2lg8xhhyk6v
2013-07-12 Garbage collector: Don't follow symlinks arbitrarilyEelco Dolstra1-41/+39
Only indirect roots (symlinks to symlinks to the Nix store) are now supported.
2013-04-26 addAdditionalRoots(): Check each path only onceEelco Dolstra1-2/+2
2013-03-08 Revert "Prevent config.h from being clobbered"Eelco Dolstra1-1/+4
This reverts commit 28bba8c44f484eae38e8a15dcec73cfa999156f6.
2013-03-07 Prevent config.h from being clobberedEelco Dolstra1-4/+1