rpmmd: add Repositories list to PackageSet struct
Attach the repository configurations that are specific to a package set directly on the PackageSet object. This simplifies the Depsolve() signature and avoids requiring a `nil` when no additional repositories are required. More importantly, it makes associating repositories to package sets explicit, no longer relying on matching array indices or map keys.
This commit is contained in:
parent
1c4d8f9988
commit
86536f11e7
10 changed files with 72 additions and 80 deletions
|
|
@ -23,7 +23,7 @@ func getManifest(bp blueprint.Blueprint, t distro.ImageType, a distro.Arch, d di
|
|||
pkgSpecSets := make(map[string][]rpmmd.PackageSpec)
|
||||
solver := dnfjson.NewSolver(d.ModulePlatformID(), d.Releasever(), a.Name(), cacheDir)
|
||||
for name, packages := range packageSets {
|
||||
res, err := solver.Depsolve([]rpmmd.PackageSet{packages}, repos, nil)
|
||||
res, err := solver.Depsolve([]rpmmd.PackageSet{packages}, repos)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue