mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
Allow hard links between the outputs of a derivation
This commit is contained in:
parent
cd49ee0897
commit
1b6ee8f4c7
3 changed files with 20 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue