From 8b46ead31b34a2cc646e36cef0cd9269c650fbae Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 27 Apr 2023 20:01:16 +0200 Subject: [PATCH] manifest: attach unresolved Content to Manifest struct Add Content to the Manifest struct to represent unresolved packages, container, and ostree commit specs that the caller should resolve before serialising the manifest. --- internal/manifest/manifest.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/internal/manifest/manifest.go b/internal/manifest/manifest.go index a0b5a3e0c..0a7c16c19 100644 --- a/internal/manifest/manifest.go +++ b/internal/manifest/manifest.go @@ -47,8 +47,33 @@ func (m *OSBuildManifest) UnmarshalJSON(payload []byte) error { return nil } +// Manifest represents a manifest initialised with all the information required +// to generate the pipelines but no content. The content included in the +// Content field must be resolved before serializing. type Manifest struct { pipelines []Pipeline + + // Content for the image that will be built by the Manifest. Each content + // type should be resolved before passing to the Serialize method. + Content Content +} + +// Content for the image that will be built by the Manifest. Each content type +// should be resolved before passing to the Serialize method. +type Content struct { + // PackageSets are sequences of package sets, each set consisting of a list + // of package names to include and exclude and a set of repositories to use + // for resolving. Package set sequences (chains) should be depsolved in + // separately and the result combined. Package set sequences (chains) are + // keyed by the name of the Pipeline that will install them. + PackageSets map[string][]rpmmd.PackageSet + + // Containers are source specifications for containers to embed in the image. + Containers []container.SourceSpec + + // OSTreeCommits are source specifications for ostree commits to embed in + // the image or use as parent commits when building a new one. + OSTreeCommits []ostree.SourceSpec } func New() Manifest {