From 1b6ee8f4c7e74f75e1f49b43cf22be7730b30649 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 13 Jun 2013 17:29:56 +0200 Subject: Allow hard links between the outputs of a derivation --- src/libstore/local-store.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/libstore/local-store.cc') 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 Inode; -typedef set 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); -- cgit 1.4.1