manifest/pipelines: add ExtraPackages

Allow the packages returned by a pipeline to be extended by setting
the optional property ExtraPackages.

In the case of OSPipeline, a further UserPackages property is added.
This allows the caller to set the set of packages that should be
depsolevd in a second transaction, on top of the one for the base
packages.

This functionality is currently unused so this is a noop.
This commit is contained in:
Tom Gundersen 2022-06-29 02:33:14 +01:00
parent fc08579c29
commit 8f9b6eef8f
4 changed files with 63 additions and 1 deletions

View file

@ -12,6 +12,9 @@ import (
// an embedded ostree commit.
type OSTreeCommitServerTreePipeline struct {
BasePipeline
// Packages to install in addition to the ones required by the
// pipeline.
ExtraPackages []string
// TODO: should this be configurable?
Language string
@ -46,6 +49,16 @@ func NewOSTreeCommitServerTreePipeline(buildPipeline *BuildPipeline,
return p
}
func (p *OSTreeCommitServerTreePipeline) getPackageSetChain() []rpmmd.PackageSet {
packages := []string{}
return []rpmmd.PackageSet{
{
Include: append(packages, p.ExtraPackages...),
Repositories: p.repos,
},
}
}
func (p *OSTreeCommitServerTreePipeline) getPackageSpecs() []rpmmd.PackageSpec {
return p.packageSpecs
}