distro: remove packageSpecSets and containers from Manifest() args

The arguments aren't used in the function anymore.
This commit is contained in:
Achilleas Koutsou 2023-05-16 01:15:36 +02:00 committed by Simon de Vlieger
parent d5d7fb4b31
commit 3b1d48ec99
24 changed files with 72 additions and 95 deletions

View file

@ -4,7 +4,6 @@ import (
"fmt"
"github.com/osbuild/osbuild-composer/internal/blueprint"
"github.com/osbuild/osbuild-composer/internal/container"
"github.com/osbuild/osbuild-composer/internal/disk"
"github.com/osbuild/osbuild-composer/internal/manifest"
"github.com/osbuild/osbuild-composer/internal/ostree"
@ -133,7 +132,7 @@ type ImageType interface {
// specified in the given blueprint; it also returns any warnings (e.g.
// deprecation notices) generated by the manifest.
// The packageSpecSets must be labelled in the same way as the originating PackageSets.
Manifest(bp *blueprint.Blueprint, options ImageOptions, repos []rpmmd.RepoConfig, packageSpecSets map[string][]rpmmd.PackageSpec, containers []container.Spec, seed int64) (*manifest.Manifest, []string, error)
Manifest(bp *blueprint.Blueprint, options ImageOptions, repos []rpmmd.RepoConfig, seed int64) (*manifest.Manifest, []string, error)
}
// The ImageOptions specify options for a specific image build

View file

@ -54,13 +54,14 @@ func TestImageType_PackageSetsChains(t *testing.T) {
bp := blueprint.Blueprint{
Customizations: customizations,
}
manifest, _, err := imageType.Manifest(&bp, distro.ImageOptions{
options := distro.ImageOptions{
OSTree: &ostree.ImageOptions{
URL: "foo",
ImageRef: "bar",
FetchChecksum: "baz",
},
}, nil, nil, nil, 0)
}
manifest, _, err := imageType.Manifest(&bp, options, nil, 0)
require.NoError(t, err)
imagePkgSets := manifest.Content.PackageSets
for packageSetName := range imageType.PackageSetsChains() {
@ -166,7 +167,7 @@ func TestImageTypePipelineNames(t *testing.T) {
packageSets[plName] = minimalPackageSet
}
m, _, err := imageType.Manifest(&bp, options, repos, nil, nil, seed)
m, _, err := imageType.Manifest(&bp, options, repos, seed)
assert.NoError(err)
containers := make(map[string][]container.Spec, 0)
@ -453,7 +454,7 @@ func TestPipelineRepositories(t *testing.T) {
}
repos := tCase.repos
manifest, _, err := imageType.Manifest(&bp, options, repos, nil, nil, 0)
manifest, _, err := imageType.Manifest(&bp, options, repos, 0)
require.NoError(err)
packageSets := manifest.Content.PackageSets

View file

@ -144,12 +144,7 @@ func TestDistro_Manifest(t *testing.T, pipelinePath string, prefix string, regis
imgPackageSpecSets = tt.PackageSpecSets
}
manifest, _, err := imageType.Manifest(tt.ComposeRequest.Blueprint,
options,
repos,
nil,
nil,
RandomTestSeed)
manifest, _, err := imageType.Manifest(tt.ComposeRequest.Blueprint, options, repos, RandomTestSeed)
if err != nil {
t.Errorf("distro.Manifest() error = %v", err)
return
@ -175,7 +170,7 @@ func TestDistro_Manifest(t *testing.T, pipelinePath string, prefix string, regis
}
func getImageTypePkgSpecSets(imageType distro.ImageType, bp blueprint.Blueprint, options distro.ImageOptions, repos []rpmmd.RepoConfig, cacheDir, dnfJsonPath string) map[string][]rpmmd.PackageSpec {
manifest, _, err := imageType.Manifest(&bp, options, repos, nil, nil, 0)
manifest, _, err := imageType.Manifest(&bp, options, repos, 0)
if err != nil {
panic("Could not generate manifest for package sets: " + err.Error())
}
@ -212,7 +207,7 @@ func kernelCount(imgType distro.ImageType, bp blueprint.Blueprint) int {
ImageRef: "bar",
FetchChecksum: "baz",
}
manifest, _, err := imgType.Manifest(&bp, distro.ImageOptions{OSTree: ostreeOptions}, nil, nil, nil, 0)
manifest, _, err := imgType.Manifest(&bp, distro.ImageOptions{OSTree: ostreeOptions}, nil, 0)
if err != nil {
panic(err)
}

View file

@ -254,7 +254,7 @@ func TestImageType_BuildPackages(t *testing.T) {
if assert.NoErrorf(t, err, "d.GetArch(%v) returned err = %v; expected nil", archLabel, err) {
continue
}
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, nil, nil, 0)
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, 0)
assert.NoError(t, err)
buildPkgs := manifest.Content.PackageSets["build"]
assert.NotNil(t, buildPkgs)
@ -427,7 +427,7 @@ func TestDistro_ManifestError(t *testing.T) {
imgOpts := distro.ImageOptions{
Size: imgType.Size(0),
}
_, _, err := imgType.Manifest(&bp, imgOpts, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, 0)
if imgTypeName == "iot-commit" || imgTypeName == "iot-container" {
assert.EqualError(t, err, "kernel boot parameter customizations are not supported for ostree types")
} else if imgTypeName == "iot-installer" {
@ -577,7 +577,7 @@ func TestDistro_CustomFileSystemManifestError(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "iot-commit" || imgTypeName == "iot-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "iot-raw-image" {
@ -607,7 +607,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "iot-commit" || imgTypeName == "iot-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "iot-raw-image" {
@ -641,7 +641,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if strings.HasPrefix(imgTypeName, "iot-") || strings.HasPrefix(imgTypeName, "image-") {
continue
} else {
@ -679,7 +679,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if strings.HasPrefix(imgTypeName, "iot-") || strings.HasPrefix(imgTypeName, "image-") {
continue
} else {
@ -713,7 +713,7 @@ func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if strings.HasPrefix(imgTypeName, "iot-") || strings.HasPrefix(imgTypeName, "image-") {
continue
} else {
@ -743,7 +743,7 @@ func TestDistro_CustomFileSystemPatternMatching(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "iot-commit" || imgTypeName == "iot-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "iot-raw-image" {
@ -773,7 +773,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
arch, _ := fedoraDistro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "iot-commit" || imgTypeName == "iot-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "iot-raw-image" {

View file

@ -261,8 +261,6 @@ func (t *imageType) PartitionType() string {
func (t *imageType) Manifest(bp *blueprint.Blueprint,
options distro.ImageOptions,
repos []rpmmd.RepoConfig,
packageSpecs map[string][]rpmmd.PackageSpec,
containers []container.Spec,
seed int64) (*manifest.Manifest, []string, error) {
warnings, err := t.checkOptions(bp, options)

View file

@ -117,7 +117,7 @@ func TestImageType_BuildPackages(t *testing.T) {
if assert.NoErrorf(t, err, "d.GetArch(%v) returned err = %v; expected nil", archLabel, err) {
continue
}
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, nil, nil, 0)
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, 0)
assert.NoError(t, err)
buildPkgs := manifest.Content.PackageSets["build"]
assert.NotNil(t, buildPkgs)
@ -179,7 +179,7 @@ func TestDistro_ManifestError(t *testing.T) {
imgOpts := distro.ImageOptions{
Size: imgType.Size(0),
}
_, _, err := imgType.Manifest(&bp, imgOpts, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, 0)
assert.NoError(t, err)
}
}
@ -285,7 +285,7 @@ func TestDistro_CustomFileSystemManifestError(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
assert.EqualError(t, err, "The following custom mountpoints are not supported [\"/etc\"]")
}
}
@ -307,7 +307,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
assert.NoError(t, err)
}
}
@ -333,7 +333,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
assert.NoError(t, err)
}
}
@ -367,7 +367,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
assert.NoError(t, err)
}
}
@ -397,7 +397,7 @@ func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
assert.EqualError(t, err, "The following custom mountpoints are not supported [\"//\" \"/var//\" \"/var//log/audit/\"]")
}
}
@ -423,7 +423,7 @@ func TestDistro_CustomFileSystemPatternMatching(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
assert.EqualError(t, err, "The following custom mountpoints are not supported [\"/variable\" \"/variable/log/audit\"]")
}
}
@ -445,7 +445,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
arch, _ := r7distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
assert.NoError(t, err)
}
}

View file

@ -152,8 +152,6 @@ func (t *imageType) PartitionType() string {
func (t *imageType) Manifest(bp *blueprint.Blueprint,
options distro.ImageOptions,
repos []rpmmd.RepoConfig,
packageSpecs map[string][]rpmmd.PackageSpec,
containers []container.Spec,
seed int64) (*manifest.Manifest, []string, error) {
warnings, err := t.checkOptions(bp, options)

View file

@ -285,7 +285,7 @@ func TestImageType_BuildPackages(t *testing.T) {
if assert.NoErrorf(t, err, "d.GetArch(%v) returned err = %v; expected nil", archLabel, err) {
continue
}
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, nil, nil, 0)
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, 0)
assert.NoError(t, err)
buildPkgs := manifest.Content.PackageSets["build"]
assert.NotNil(t, buildPkgs)
@ -475,7 +475,7 @@ func TestDistro_ManifestError(t *testing.T) {
imgOpts := distro.ImageOptions{
Size: imgType.Size(0),
}
_, _, err := imgType.Manifest(&bp, imgOpts, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "kernel boot parameter customizations are not supported for ostree types")
} else if imgTypeName == "edge-raw-image" {
@ -658,7 +658,7 @@ func TestDistro_CustomFileSystemManifestError(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if unsupported[imgTypeName] {
@ -692,7 +692,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if unsupported[imgTypeName] {
@ -732,7 +732,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if unsupported[imgTypeName] {
assert.Error(t, err)
} else {
@ -778,7 +778,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if unsupported[imgTypeName] {
assert.Error(t, err)
} else {
@ -820,7 +820,7 @@ func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if unsupported[imgTypeName] {
assert.Error(t, err)
} else {
@ -856,7 +856,7 @@ func TestDistro_CustomFileSystemPatternMatching(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if unsupported[imgTypeName] {
@ -890,7 +890,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
arch, _ := r8distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if unsupported[imgTypeName] {

View file

@ -186,8 +186,6 @@ func (t *imageType) PartitionType() string {
func (t *imageType) Manifest(bp *blueprint.Blueprint,
options distro.ImageOptions,
repos []rpmmd.RepoConfig,
packageSpecs map[string][]rpmmd.PackageSpec,
containers []container.Spec,
seed int64) (*manifest.Manifest, []string, error) {
warnings, err := t.checkOptions(bp, options)

View file

@ -270,7 +270,7 @@ func TestImageType_BuildPackages(t *testing.T) {
if assert.NoErrorf(t, err, "d.GetArch(%v) returned err = %v; expected nil", archLabel, err) {
continue
}
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, nil, nil, 0)
manifest, _, err := itStruct.Manifest(&blueprint.Blueprint{}, distro.ImageOptions{}, nil, 0)
assert.NoError(t, err)
buildPkgs := manifest.Content.PackageSets["build"]
assert.NotNil(t, buildPkgs)
@ -458,7 +458,7 @@ func TestDistro_ManifestError(t *testing.T) {
imgOpts := distro.ImageOptions{
Size: imgType.Size(0),
}
_, _, err := imgType.Manifest(&bp, imgOpts, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, imgOpts, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "kernel boot parameter customizations are not supported for ostree types")
} else if imgTypeName == "edge-raw-image" {
@ -631,7 +631,7 @@ func TestDistro_CustomFileSystemManifestError(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "edge-installer" || imgTypeName == "edge-simplified-installer" || imgTypeName == "edge-raw-image" {
@ -659,7 +659,7 @@ func TestDistro_TestRootMountPoint(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "edge-installer" || imgTypeName == "edge-simplified-installer" || imgTypeName == "edge-raw-image" {
@ -691,7 +691,7 @@ func TestDistro_CustomFileSystemSubDirectories(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if strings.HasPrefix(imgTypeName, "edge-") {
continue
} else {
@ -729,7 +729,7 @@ func TestDistro_MountpointsWithArbitraryDepthAllowed(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if strings.HasPrefix(imgTypeName, "edge-") {
continue
} else {
@ -763,7 +763,7 @@ func TestDistro_DirtyMountpointsNotAllowed(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if strings.HasPrefix(imgTypeName, "edge-") {
continue
} else {
@ -793,7 +793,7 @@ func TestDistro_CustomFileSystemPatternMatching(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "edge-installer" || imgTypeName == "edge-simplified-installer" || imgTypeName == "edge-raw-image" {
@ -821,7 +821,7 @@ func TestDistro_CustomUsrPartitionNotLargeEnough(t *testing.T) {
arch, _ := r9distro.GetArch(archName)
for _, imgTypeName := range arch.ListImageTypes() {
imgType, _ := arch.GetImageType(imgTypeName)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, nil, nil, 0)
_, _, err := imgType.Manifest(&bp, distro.ImageOptions{}, nil, 0)
if imgTypeName == "edge-commit" || imgTypeName == "edge-container" {
assert.EqualError(t, err, "Custom mountpoints are not supported for ostree types")
} else if imgTypeName == "edge-installer" || imgTypeName == "edge-simplified-installer" || imgTypeName == "edge-raw-image" {

View file

@ -189,8 +189,6 @@ func (t *imageType) PartitionType() string {
func (t *imageType) Manifest(bp *blueprint.Blueprint,
options distro.ImageOptions,
repos []rpmmd.RepoConfig,
packageSpecs map[string][]rpmmd.PackageSpec,
containers []container.Spec,
seed int64) (*manifest.Manifest, []string, error) {
warnings, err := t.checkOptions(bp, options)

View file

@ -6,7 +6,6 @@ import (
"sort"
"github.com/osbuild/osbuild-composer/internal/blueprint"
"github.com/osbuild/osbuild-composer/internal/container"
"github.com/osbuild/osbuild-composer/internal/distro"
"github.com/osbuild/osbuild-composer/internal/distroregistry"
"github.com/osbuild/osbuild-composer/internal/manifest"
@ -242,7 +241,7 @@ func (t *TestImageType) Exports() []string {
return distro.ExportsFallback()
}
func (t *TestImageType) Manifest(b *blueprint.Blueprint, options distro.ImageOptions, repos []rpmmd.RepoConfig, packageSpecSets map[string][]rpmmd.PackageSpec, containers []container.Spec, seed int64) (*manifest.Manifest, []string, error) {
func (t *TestImageType) Manifest(b *blueprint.Blueprint, options distro.ImageOptions, repos []rpmmd.RepoConfig, seed int64) (*manifest.Manifest, []string, error) {
var bpPkgs []string
if b != nil {
mountpoints := b.Customizations.GetFilesystems()