1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 15:02:42 +01:00

Restore the hash mismatch activity

This commit is contained in:
Eelco Dolstra 2025-05-18 13:10:08 +02:00
parent f50117ba4c
commit 136cc106e7
3 changed files with 9 additions and 3 deletions

View file

@ -872,6 +872,7 @@ Goal::Co DerivationGoal::tryToBuild()
*drvOptions, *drvOptions,
inputPaths, inputPaths,
initialOutputs, initialOutputs,
act
}); });
} }

View file

@ -2709,14 +2709,12 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
store.printStorePath(drvPath), store.printStorePath(drvPath),
wanted.to_string(HashFormat::SRI, true), wanted.to_string(HashFormat::SRI, true),
got.to_string(HashFormat::SRI, true))); got.to_string(HashFormat::SRI, true)));
#if 0 // FIXME
act->result(resHashMismatch, act->result(resHashMismatch,
{ {
{"storePath", store.printStorePath(drvPath)}, {"storePath", store.printStorePath(drvPath)},
{"wanted", wanted}, {"wanted", wanted},
{"got", got}, {"got", got},
}); });
#endif
} }
if (!newInfo0.references.empty()) { if (!newInfo0.references.empty()) {
auto numViolations = newInfo.references.size(); auto numViolations = newInfo.references.size();

View file

@ -58,6 +58,11 @@ struct DerivationBuilderParams
const BuildMode & buildMode; const BuildMode & buildMode;
/**
* The activity corresponding to the build.
*/
std::unique_ptr<Activity> & act;
DerivationBuilderParams( DerivationBuilderParams(
const StorePath & drvPath, const StorePath & drvPath,
const BuildMode & buildMode, const BuildMode & buildMode,
@ -66,7 +71,8 @@ struct DerivationBuilderParams
const StructuredAttrs * parsedDrv, const StructuredAttrs * parsedDrv,
const DerivationOptions & drvOptions, const DerivationOptions & drvOptions,
const StorePathSet & inputPaths, const StorePathSet & inputPaths,
std::map<std::string, InitialOutput> & initialOutputs) std::map<std::string, InitialOutput> & initialOutputs,
std::unique_ptr<Activity> & act)
: drvPath{drvPath} : drvPath{drvPath}
, buildResult{buildResult} , buildResult{buildResult}
, drv{drv} , drv{drv}
@ -75,6 +81,7 @@ struct DerivationBuilderParams
, inputPaths{inputPaths} , inputPaths{inputPaths}
, initialOutputs{initialOutputs} , initialOutputs{initialOutputs}
, buildMode{buildMode} , buildMode{buildMode}
, act{act}
{ } { }
DerivationBuilderParams(DerivationBuilderParams &&) = default; DerivationBuilderParams(DerivationBuilderParams &&) = default;