Expand also when ordering assertions

This commit is contained in:
Ettore Di Giacinto
2019-11-29 19:01:52 +01:00
parent 91b3daf180
commit d0c84d24a0
5 changed files with 53 additions and 44 deletions

View File

@@ -349,7 +349,8 @@ func (cs *LuetCompiler) ComputeDepTree(p CompilationSpec) (solver.PackagesAssert
if err != nil {
return nil, errors.Wrap(err, "While computing a solution for "+p.GetPackage().GetName())
}
dependencies := solution.Order(p.GetPackage().GetFingerPrint())
dependencies := solution.Order(cs.Database, p.GetPackage().GetFingerPrint())
assertions := solver.PackagesAssertions{}
for _, assertion := range dependencies { //highly dependent on the order
@@ -360,8 +361,8 @@ func (cs *LuetCompiler) ComputeDepTree(p CompilationSpec) (solver.PackagesAssert
}
assertion.Hash = solver.PackageHash{
BuildHash: nthsolution.Order(assertion.Package.GetFingerPrint()).Drop(assertion.Package).AssertionHash(),
PackageHash: nthsolution.Order(assertion.Package.GetFingerPrint()).AssertionHash(),
BuildHash: nthsolution.Order(cs.Database, assertion.Package.GetFingerPrint()).Drop(assertion.Package).AssertionHash(),
PackageHash: nthsolution.Order(cs.Database, assertion.Package.GetFingerPrint()).AssertionHash(),
}
assertions = append(assertions, assertion)
}