distro/test: set dnf-json path for solver

The value comes from the command line args of the test binary
(osbuild-composer-manifest-tests).  It works in our tests because we use
the default value, but if it was set differently it would have been
ignored.
This commit is contained in:
Achilleas Koutsou 2023-02-17 15:19:40 +01:00 committed by Tomáš Hozza
parent 114ed20fab
commit b0a6b486a1

View file

@ -165,6 +165,7 @@ func getImageTypePkgSpecSets(imageType distro.ImageType, bp blueprint.Blueprint,
imgPackageSets := imageType.PackageSets(bp, options, repos)
solver := dnfjson.NewSolver(imageType.Arch().Distro().ModulePlatformID(), imageType.Arch().Distro().Releasever(), imageType.Arch().Name(), cacheDir)
solver.SetDNFJSONPath(dnfJsonPath)
depsolvedSets := make(map[string][]rpmmd.PackageSpec)
for name, packages := range imgPackageSets {
res, err := solver.Depsolve(packages)