composer: use distro name aliases from configuration
Register the distro name aliases from the configuration on the distro factory. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
b79eaeb78e
commit
8ba3426f12
1 changed files with 4 additions and 3 deletions
|
|
@ -69,9 +69,10 @@ func NewComposer(config *ComposerConfigFile, stateDir, cacheDir string) (*Compos
|
|||
}
|
||||
|
||||
c.distros = distrofactory.NewDefault()
|
||||
// TODO: set the c.config.DistroAliases to the distrofactory
|
||||
// More work is needed to make the distro aliases behavior consistent for Weldr API,
|
||||
// specifically for picking the correct repositories definition.
|
||||
err = c.distros.RegisterAliases(config.DistroAliases)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to configure distro aliases: %v", err)
|
||||
}
|
||||
|
||||
c.solver = dnfjson.NewBaseSolver(path.Join(c.cacheDir, "rpmmd"))
|
||||
c.solver.SetDNFJSONPath(c.config.DNFJson)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue