aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore/store-api.cc
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-04-16 18:15:28 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-04-16 18:15:28 +0200
commit5d904d63f4d43e3f0e4be38c5f5404e029c00a22 (patch)
treeb2893eceae99c967e0f49cdbfe084f6c7d4767c4 /nix/libstore/store-api.cc
parentbab5f3a7f62150ae009e78d03c4b1f5b1646104c (diff)
parentd0ee11b2f000c3c027fd8370bc2195266398444f (diff)
downloadpatches-5d904d63f4d43e3f0e4be38c5f5404e029c00a22.tar
patches-5d904d63f4d43e3f0e4be38c5f5404e029c00a22.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'nix/libstore/store-api.cc')
-rw-r--r--nix/libstore/store-api.cc31
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)
{