osbuild: create skopeo-index source in GenSources()
When generating sources in GenSources(), add a skopeo-index source reference for each list-digest found in the container specs.
This commit is contained in:
parent
e5aaf3e514
commit
753bcaed78
1 changed files with 9 additions and 0 deletions
|
|
@ -102,13 +102,22 @@ func GenSources(packages []rpmmd.PackageSpec, ostreeCommits []ostree.CommitSpec,
|
|||
}
|
||||
|
||||
skopeo := NewSkopeoSource()
|
||||
skopeoIndex := NewSkopeoIndexSource()
|
||||
for _, c := range containers {
|
||||
skopeo.AddItem(c.Source, c.Digest, c.ImageID, c.TLSVerify)
|
||||
|
||||
// if we have a list digest, add a skopeo-index source as well
|
||||
if c.ListDigest != "" {
|
||||
skopeoIndex.AddItem(c.Source, c.ListDigest, c.TLSVerify)
|
||||
}
|
||||
}
|
||||
|
||||
if len(skopeo.Items) > 0 {
|
||||
sources["org.osbuild.skopeo"] = skopeo
|
||||
}
|
||||
if len(skopeoIndex.Items) > 0 {
|
||||
sources["org.osbuild.skopeo-index"] = skopeoIndex
|
||||
}
|
||||
|
||||
return sources
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue