Move GetRedHatRelease() and GetHostDistroName() to common package

The `distro` package is now used for distro definitions supported by
osbuild-composer, not for introspecting the Host system. Move
`GetRedHatRelease()` and `GetHostDistroName()` functions to the `common`
package.
This commit is contained in:
Tomas Hozza 2022-06-02 10:28:50 +02:00 committed by Tom Gundersen
parent 804d4210df
commit c7e5e3c9c2
7 changed files with 85 additions and 80 deletions

View file

@ -115,7 +115,7 @@ func WithBootedQemuImage(image string, ns NetNS, f func() error) error {
var qemuCmd *exec.Cmd
if common.CurrentArch() == "x86_64" {
hostDistroName, _, _, err := distro.GetHostDistroName()
hostDistroName, _, _, err := common.GetHostDistroName()
if err != nil {
return fmt.Errorf("cannot determing the current distro: %v", err)
}