osbuild-pipeline: resolve ostree commits
Properly resolve any ostree commit checksums. Don't make the user specify the checksum through the parent.
This commit is contained in:
parent
0eb999d510
commit
96b7f05f6f
1 changed files with 4 additions and 5 deletions
|
|
@ -219,17 +219,16 @@ func main() {
|
|||
containers[name] = containerSpecs
|
||||
}
|
||||
|
||||
// "resolve" ostree commits by copying the source specs into commit specs
|
||||
commitSources := manifest.GetOSTreeSourceSpecs()
|
||||
commits := make(map[string][]ostree.CommitSpec, len(commitSources))
|
||||
for name, commitSources := range commitSources {
|
||||
commitSpecs := make([]ostree.CommitSpec, len(commitSources))
|
||||
for idx, commitSource := range commitSources {
|
||||
commitSpecs[idx] = ostree.CommitSpec{
|
||||
Ref: commitSource.Ref,
|
||||
URL: commitSource.URL,
|
||||
Checksum: commitSource.Parent,
|
||||
commitSpec, err := ostree.Resolve(commitSource)
|
||||
if err != nil {
|
||||
panic("Could not resolve ostree commit: " + err.Error())
|
||||
}
|
||||
commitSpecs[idx] = commitSpec
|
||||
}
|
||||
commits[name] = commitSpecs
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue