many: update for new reporegistry.New() api (c.f. pr#1179)
This commit updates osbuild-composer for the new API in images for the `reporegistry.New()`. The main incompatible change is that the `/repositories` part is not longer automatically added inside the library so we need to add it on the call-site. This needs https://github.com/osbuild/images/pull/1179
This commit is contained in:
parent
13329ebb2e
commit
35167ce83f
5 changed files with 8 additions and 10 deletions
|
|
@ -77,7 +77,7 @@ func NewComposer(config *ComposerConfigFile, stateDir, cacheDir string) (*Compos
|
|||
return nil, fmt.Errorf("failed to configure distro aliases: %v", err)
|
||||
}
|
||||
|
||||
c.repos, err = reporegistry.New(repositoryConfigs)
|
||||
c.repos, err = reporegistry.New(repositoryConfigs, nil)
|
||||
switch err.(type) {
|
||||
case nil:
|
||||
// fine
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ const (
|
|||
)
|
||||
|
||||
var repositoryConfigs = []string{
|
||||
"/etc/osbuild-composer",
|
||||
"/usr/share/osbuild-composer",
|
||||
"/etc/osbuild-composer/repositories",
|
||||
"/usr/share/osbuild-composer/repositories",
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import (
|
|||
// this should run cross-arch dependency solving N-1 times.
|
||||
func TestCrossArchDepsolve(t *testing.T) {
|
||||
// Load repositories from the definition we provide in the RPM package
|
||||
repoDir := "/usr/share/tests/osbuild-composer"
|
||||
repoDir := "/usr/share/tests/osbuild-composer/repositories"
|
||||
|
||||
// NOTE: we can add RHEL, but don't make it hard requirement because it will fail outside of VPN
|
||||
cs9 := rhel9.DistroFactory("centos-9")
|
||||
|
|
@ -83,7 +83,7 @@ func TestCrossArchDepsolve(t *testing.T) {
|
|||
// and tries to depsolve all package sets of one image type for one architecture.
|
||||
func TestDepsolvePackageSets(t *testing.T) {
|
||||
// Load repositories from the definition we provide in the RPM package
|
||||
repoDir := "/usr/share/tests/osbuild-composer"
|
||||
repoDir := "/usr/share/tests/osbuild-composer/repositories"
|
||||
|
||||
// NOTE: we can add RHEL, but don't make it hard requirement because it will fail outside of VPN
|
||||
cs9 := rhel9.DistroFactory("centos-9")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue