forked from lix-project/lix
Return more info from BinaryCacheStore::addToStoreCommon
We don't need it yet, but we could/should in the future, and it's a cost-free change since we already have the reference. I like it. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
412b3a54fb
commit
3f226f71c1
|
@ -142,7 +142,7 @@ struct FileSource : FdSource
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
StorePath BinaryCacheStore::addToStoreCommon(
|
ref<const ValidPathInfo> BinaryCacheStore::addToStoreCommon(
|
||||||
Source & narSource, RepairFlag repair, CheckSigsFlag checkSigs,
|
Source & narSource, RepairFlag repair, CheckSigsFlag checkSigs,
|
||||||
std::function<ValidPathInfo(HashResult)> mkInfo)
|
std::function<ValidPathInfo(HashResult)> mkInfo)
|
||||||
{
|
{
|
||||||
|
@ -297,7 +297,7 @@ StorePath BinaryCacheStore::addToStoreCommon(
|
||||||
|
|
||||||
stats.narInfoWrite++;
|
stats.narInfoWrite++;
|
||||||
|
|
||||||
return narInfo->path;
|
return narInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BinaryCacheStore::addToStore(const ValidPathInfo & info, Source & narSource,
|
void BinaryCacheStore::addToStore(const ValidPathInfo & info, Source & narSource,
|
||||||
|
@ -330,7 +330,7 @@ StorePath BinaryCacheStore::addToStoreFromDump(Source & dump, const string & nam
|
||||||
};
|
};
|
||||||
info.narSize = nar.second;
|
info.narSize = nar.second;
|
||||||
return info;
|
return info;
|
||||||
});
|
})->path;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BinaryCacheStore::isValidPathUncached(const StorePath & storePath)
|
bool BinaryCacheStore::isValidPathUncached(const StorePath & storePath)
|
||||||
|
@ -430,7 +430,7 @@ StorePath BinaryCacheStore::addTextToStore(const string & name, const string & s
|
||||||
info.narSize = nar.second;
|
info.narSize = nar.second;
|
||||||
info.references = references;
|
info.references = references;
|
||||||
return info;
|
return info;
|
||||||
});
|
})->path;
|
||||||
}
|
}
|
||||||
|
|
||||||
ref<FSAccessor> BinaryCacheStore::getFSAccessor()
|
ref<FSAccessor> BinaryCacheStore::getFSAccessor()
|
||||||
|
|
|
@ -72,7 +72,7 @@ private:
|
||||||
|
|
||||||
void writeNarInfo(ref<NarInfo> narInfo);
|
void writeNarInfo(ref<NarInfo> narInfo);
|
||||||
|
|
||||||
StorePath addToStoreCommon(
|
ref<const ValidPathInfo> addToStoreCommon(
|
||||||
Source & narSource, RepairFlag repair, CheckSigsFlag checkSigs,
|
Source & narSource, RepairFlag repair, CheckSigsFlag checkSigs,
|
||||||
std::function<ValidPathInfo(HashResult)> mkInfo);
|
std::function<ValidPathInfo(HashResult)> mkInfo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue