mirror of
https://github.com/NixOS/nix
synced 2024-09-19 23:03:53 -04:00
Merge pull request #9810 from NixOS/backport-9804-to-2.19-maintenance
[Backport 2.19-maintenance] Fix crash when NAR is missing from binary cache
This commit is contained in:
commit
f1788c425b
|
@ -238,7 +238,7 @@ void Worker::childTerminated(Goal * goal, bool wakeSleepers)
|
||||||
|
|
||||||
void Worker::waitForBuildSlot(GoalPtr goal)
|
void Worker::waitForBuildSlot(GoalPtr goal)
|
||||||
{
|
{
|
||||||
debug("wait for build slot");
|
goal->trace("wait for build slot");
|
||||||
bool isSubstitutionGoal = goal->jobCategory() == JobCategory::Substitution;
|
bool isSubstitutionGoal = goal->jobCategory() == JobCategory::Substitution;
|
||||||
if ((!isSubstitutionGoal && getNrLocalBuilds() < settings.maxBuildJobs) ||
|
if ((!isSubstitutionGoal && getNrLocalBuilds() < settings.maxBuildJobs) ||
|
||||||
(isSubstitutionGoal && getNrSubstitutions() < settings.maxSubstitutionJobs))
|
(isSubstitutionGoal && getNrSubstitutions() < settings.maxSubstitutionJobs))
|
||||||
|
|
|
@ -1202,7 +1202,11 @@ void LocalStore::addToStore(const ValidPathInfo & info, Source & source,
|
||||||
Finally cleanup = [&]() {
|
Finally cleanup = [&]() {
|
||||||
if (!narRead) {
|
if (!narRead) {
|
||||||
NullParseSink sink;
|
NullParseSink sink;
|
||||||
|
try {
|
||||||
parseDump(sink, source);
|
parseDump(sink, source);
|
||||||
|
} catch (...) {
|
||||||
|
ignoreException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -982,6 +982,11 @@ void copyStorePath(
|
||||||
RepairFlag repair,
|
RepairFlag repair,
|
||||||
CheckSigsFlag checkSigs)
|
CheckSigsFlag checkSigs)
|
||||||
{
|
{
|
||||||
|
/* Bail out early (before starting a download from srcStore) if
|
||||||
|
dstStore already has this path. */
|
||||||
|
if (!repair && dstStore.isValidPath(storePath))
|
||||||
|
return;
|
||||||
|
|
||||||
auto srcUri = srcStore.getUri();
|
auto srcUri = srcStore.getUri();
|
||||||
auto dstUri = dstStore.getUri();
|
auto dstUri = dstStore.getUri();
|
||||||
auto storePathS = srcStore.printStorePath(storePath);
|
auto storePathS = srcStore.printStorePath(storePath);
|
||||||
|
|
Loading…
Reference in a new issue