Bump osbuild/images dependency to v0.12.0
This brings in the support for: - RHEL-8.10 - RHEL-9.4 - ppc64le and s390x on Fedora (qcow2, container) Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
73edc381d8
commit
1903556198
136 changed files with 5293 additions and 1827 deletions
33
vendor/github.com/osbuild/images/internal/common/distro.go
generated
vendored
33
vendor/github.com/osbuild/images/internal/common/distro.go
generated
vendored
|
|
@ -6,6 +6,8 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/go-version"
|
||||
)
|
||||
|
||||
func GetHostDistroName() (string, bool, bool, error) {
|
||||
|
|
@ -54,30 +56,23 @@ func readOSRelease(r io.Reader) (map[string]string, error) {
|
|||
|
||||
// Returns true if the version represented by the first argument is
|
||||
// semantically older than the second.
|
||||
//
|
||||
// Meant to be used for comparing distro versions for differences between minor
|
||||
// releases.
|
||||
// Evaluates to false if a and b are equal.
|
||||
//
|
||||
// Provided version strings are of any characters which are not
|
||||
// digits or periods, and then split on periods.
|
||||
// Assumes any missing components are 0, so 8 < 8.1.
|
||||
// Evaluates to false if a and b are equal.
|
||||
func VersionLessThan(a, b string) bool {
|
||||
aParts := strings.Split(a, ".")
|
||||
bParts := strings.Split(b, ".")
|
||||
|
||||
// pad shortest argument with zeroes
|
||||
for len(aParts) < len(bParts) {
|
||||
aParts = append(aParts, "0")
|
||||
aV, err := version.NewVersion(a)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for len(bParts) < len(aParts) {
|
||||
bParts = append(bParts, "0")
|
||||
bV, err := version.NewVersion(b)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
for idx := 0; idx < len(aParts); idx++ {
|
||||
if aParts[idx] < bParts[idx] {
|
||||
return true
|
||||
} else if aParts[idx] > bParts[idx] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// equal
|
||||
return false
|
||||
return aV.LessThan(bV)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue