go.mod: update osbuild/images to v0.95.0

This commit is contained in:
Achilleas Koutsou 2024-10-29 09:21:28 +01:00 committed by Lukáš Zapletal
parent 69525b7ce6
commit 161a263b45
6 changed files with 22 additions and 9 deletions

2
go.mod
View file

@ -46,7 +46,7 @@ require (
github.com/labstack/gommon v0.4.2
github.com/openshift-online/ocm-sdk-go v0.1.438
github.com/oracle/oci-go-sdk/v54 v54.0.0
github.com/osbuild/images v0.94.0
github.com/osbuild/images v0.95.0
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d
github.com/osbuild/pulp-client v0.1.0
github.com/prometheus/client_golang v1.20.2

4
go.sum
View file

@ -534,8 +534,8 @@ github.com/openshift-online/ocm-sdk-go v0.1.438 h1:tsLCCUzbLCTL4RZG02y9RuopmGCXp
github.com/openshift-online/ocm-sdk-go v0.1.438/go.mod h1:CiAu2jwl3ITKOxkeV0Qnhzv4gs35AmpIzVABQLtcI2Y=
github.com/oracle/oci-go-sdk/v54 v54.0.0 h1:CDLjeSejv2aDpElAJrhKpi6zvT/zhZCZuXchUUZ+LS4=
github.com/oracle/oci-go-sdk/v54 v54.0.0/go.mod h1:+t+yvcFGVp+3ZnztnyxqXfQDsMlq8U25faBLa+mqCMc=
github.com/osbuild/images v0.94.0 h1:bdvVW+qIAwfyoYdMH5f4ZVJBVxEVWPyqpDXNhrwN2MI=
github.com/osbuild/images v0.94.0/go.mod h1:4bNmMQOVadIKVC1q8zsLO8tdEQFH90zIp+MQBQUnCiE=
github.com/osbuild/images v0.95.0 h1:WWxYEQKD9wFGs/zkWF4wd3IDwNColZwzKsQh/+dwvUw=
github.com/osbuild/images v0.95.0/go.mod h1:4bNmMQOVadIKVC1q8zsLO8tdEQFH90zIp+MQBQUnCiE=
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d h1:r9BFPDv0uuA9k1947Jybcxs36c/pTywWS1gjeizvtcQ=
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d/go.mod h1:zR1iu/hOuf+OQNJlk70tju9IqzzM4ycq0ectkFBm94U=
github.com/osbuild/pulp-client v0.1.0 h1:L0C4ezBJGTamN3BKdv+rKLuq/WxXJbsFwz/Hj7aEmJ8=

View file

@ -0,0 +1,13 @@
package reporegistry
import "fmt"
// NoReposLoadedError is an error type that is returned when no repositories
// are loaded from the given paths.
type NoReposLoadedError struct {
Paths []string
}
func (e *NoReposLoadedError) Error() string {
return fmt.Sprintf("no repositories found in the given paths: %v", e.Paths)
}

View file

@ -23,9 +23,6 @@ func New(repoConfigPaths []string) (*RepoRegistry, error) {
if err != nil {
return nil, err
}
if len(repositories) == 0 {
return nil, fmt.Errorf("no repositories found in the given paths: %v", repoConfigPaths)
}
return &RepoRegistry{repositories}, nil
}

View file

@ -1,7 +1,6 @@
package reporegistry
import (
"fmt"
"log"
"os"
"path/filepath"
@ -66,6 +65,10 @@ func LoadAllRepositories(confPaths []string) (rpmmd.DistrosRepoConfigs, error) {
}
}
if len(distrosRepoConfigs) == 0 {
return nil, &NoReposLoadedError{confPaths}
}
return distrosRepoConfigs, nil
}
@ -93,7 +96,7 @@ func LoadRepositories(confPaths []string, distro string) (map[string][]rpmmd.Rep
}
if repoConfigs == nil {
return nil, fmt.Errorf("LoadRepositories failed: none of the provided paths contain distro configuration")
return nil, &NoReposLoadedError{confPaths}
}
return repoConfigs, nil

2
vendor/modules.txt vendored
View file

@ -1022,7 +1022,7 @@ github.com/oracle/oci-go-sdk/v54/identity
github.com/oracle/oci-go-sdk/v54/objectstorage
github.com/oracle/oci-go-sdk/v54/objectstorage/transfer
github.com/oracle/oci-go-sdk/v54/workrequests
# github.com/osbuild/images v0.94.0
# github.com/osbuild/images v0.95.0
## explicit; go 1.21.0
github.com/osbuild/images/internal/common
github.com/osbuild/images/internal/environment