Skip to content

Commit

Permalink
chore: rpm: switch to dnf instead of yum
Browse files Browse the repository at this point in the history
  • Loading branch information
M0Rf30 committed May 14, 2024
1 parent 4f88ac6 commit 0cd0e4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
"apk",
"apt",
"pacman",
"yum",
"dnf",
}

ReleasesSet = set.NewSet()
Expand Down
4 changes: 2 additions & 2 deletions pkg/rpm/rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (r *RPM) Install(artifactsPath string) error {
pkgFilePath := filepath.Join(artifactsPath, RPMArchs[arch], pkgName)

if err := utils.Exec(false, "",
"yum",
"dnf",
"install",
"-y",
pkgFilePath); err != nil {
Expand All @@ -120,7 +120,7 @@ func (r *RPM) PrepareEnvironment(golang bool) error {
}
args = append(args, buildEnvironmentDeps...)

if err := utils.Exec(false, "", "yum", args...); err != nil {
if err := utils.Exec(false, "", "dnf", args...); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func init() {
case "pacman":
packageManager = "pacman"
case "redhat":
packageManager = "yum"
packageManager = "dnf"
default:
Logger.Fatal("failed to find supported package manager for distro",
Logger.Args("distro", distro))
Expand Down

0 comments on commit 0cd0e4d

Please sign in to comment.