about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-06-13T15·29+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-06-13T15·29+0200
commit1b6ee8f4c7e74f75e1f49b43cf22be7730b30649 (patch)
treef5cad59175b0614105b72c29ae95148c31c15651 /src/libstore/local-store.cc
parentcd49ee08970f0fa44053fb12cdf29668e8131a51 (diff)
Allow hard links between the outputs of a derivation
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 857d4cee05cd..13c70fbf5713 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -500,10 +500,6 @@ void canonicaliseTimestampAndPermissions(const Path & path)
 }
 
 
-typedef std::pair<dev_t, ino_t> Inode;
-typedef set<Inode> InodesSeen;
-
-
 static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSeen & inodesSeen)
 {
     checkInterrupt();
@@ -561,10 +557,8 @@ static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSe
 }
 
 
-void canonicalisePathMetaData(const Path & path, uid_t fromUid)
+void canonicalisePathMetaData(const Path & path, uid_t fromUid, InodesSeen & inodesSeen)
 {
-    InodesSeen inodesSeen;
-
     canonicalisePathMetaData_(path, fromUid, inodesSeen);
 
     /* On platforms that don't have lchown(), the top-level path can't
@@ -580,6 +574,13 @@ void canonicalisePathMetaData(const Path & path, uid_t fromUid)
 }
 
 
+void canonicalisePathMetaData(const Path & path, uid_t fromUid)
+{
+    InodesSeen inodesSeen;
+    canonicalisePathMetaData(path, fromUid, inodesSeen);
+}
+
+
 void LocalStore::checkDerivationOutputs(const Path & drvPath, const Derivation & drv)
 {
     string drvName = storePathToName(drvPath);