diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2018-03-29 16:56:00 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-03-30 23:42:07 +0200 |
commit | c7589cce8d3f9fcb7769e424f341dba8fb3545d0 (patch) | |
tree | 157c37d5933152efc20e2aa268a573b0ddad1bdc /nix/libstore/store-api.cc | |
parent | dffd077c59e0faf8200422572b7d3aab611f0348 (diff) | |
download | guix-c7589cce8d3f9fcb7769e424f341dba8fb3545d0.tar guix-c7589cce8d3f9fcb7769e424f341dba8fb3545d0.tar.gz |
daemon: Remove dead code.
* nix/libstore/globals.cc (Settings::loadConfFile, Settings::unpack):
Remove.
* nix/libstore/globals.hh: Adjust accordingly.
* nix/libstore/misc.cc (queryMissing): Remove.
* nix/libstore/misc.hh: Adjust accordingly.
* nix/libstore/store-api.cc (followLinksToStore)
(followLinksToStorePath, computeStorePathForHash): Remove.
* nix/libstore/store-api.hh: Adjust accordingly.
Diffstat (limited to 'nix/libstore/store-api.cc')
-rw-r--r-- | nix/libstore/store-api.cc | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 30af5f5fed..6742d2ed49 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -48,26 +48,6 @@ Path toStorePath(const Path & path) } -Path followLinksToStore(const Path & _path) -{ - Path path = absPath(_path); - while (!isInStore(path)) { - if (!isLink(path)) break; - string target = readLink(path); - path = absPath(target, dirOf(path)); - } - if (!isInStore(path)) - throw Error(format("path `%1%' is not in the Nix store") % path); - return path; -} - - -Path followLinksToStorePath(const Path & path) -{ - return toStorePath(followLinksToStore(path)); -} - - string storePathToName(const Path & path) { assertStorePath(path); @@ -200,17 +180,6 @@ Path makeFixedOutputPath(bool recursive, } -std::pair<Path, Hash> computeStorePathForPath(const Path & srcPath, - bool recursive, HashType hashAlgo, PathFilter & filter) -{ - HashType ht(hashAlgo); - Hash h = recursive ? hashPath(ht, srcPath, filter).first : hashFile(ht, srcPath); - string name = baseNameOf(srcPath); - Path dstPath = makeFixedOutputPath(recursive, hashAlgo, h, name); - return std::pair<Path, Hash>(dstPath, h); -} - - Path computeStorePathForText(const string & name, const string & s, const PathSet & references) { |