distro: allow to return warnings in the Manifest function

This changes the `Manifest` function of the `ImageType`
interface so that any warnings detected during the
`checkOptions` step of the manifest initialization can
be propagated back to the Weldr-API (see next commit).

Signed-off-by: Irene Diez <idiez@redhat.com>
This commit is contained in:
Irene Diez 2023-03-08 13:10:08 +01:00 committed by Tomáš Hozza
parent d952e41161
commit 8022c227ba
8 changed files with 22 additions and 21 deletions

View file

@ -458,7 +458,7 @@ func generateManifest(ctx context.Context, workers *worker.Server, depsolveJobID
options.OSTree.URL = result.Specs[0].URL
}
manifest, err := imageType.Manifest(b, options, repos, depsolveResults.PackageSpecs, containerSpecs, seed)
manifest, _, err := imageType.Manifest(b, options, repos, depsolveResults.PackageSpecs, containerSpecs, seed)
if err != nil {
reason := "Error generating manifest"
jobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorManifestGeneration, reason, nil)