Skip to content

Commit

Permalink
fix: microdnf update (#721)
Browse files Browse the repository at this point in the history
Signed-off-by: Miaha Cybersec <[email protected]>
Co-authored-by: Ashna Mehrotra <[email protected]>
  • Loading branch information
MiahaCybersec and ashnamehrotra authored Jul 29, 2024
1 parent da90152 commit 473202f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions integration/fixtures/test-images.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@
"description": "Valid rpm DB, yum present",
"ignoreErrors": false
},
{
"image": "docker.io/redhat/ubi9-minimal",
"tag": "9.4-949",
"digest": "sha256:9607229894026ebecade4623038fce35bb75bf9371aca7b08ca11b08d103d2ab",
"distro": "Redhat",
"description": "Valid microdnf, no yum/dnf/rpm"
},
{
"image": "docker.io/grafana/grafana-image-renderer",
"tag" : "3.4.0",
Expand Down
2 changes: 1 addition & 1 deletion pkg/pkgmgr/rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func (rm *rpmManager) installUpdates(ctx context.Context, updates unversioned.Up
return nil, nil, fmt.Errorf("no patchable packages found")
}

const microdnfInstallTemplate = `sh -c '%[1]s update %[2]s && %[1]s clean all'`
const microdnfInstallTemplate = `sh -c '%[1]s update %[2]s -y && %[1]s clean all'`
installCmd = fmt.Sprintf(microdnfInstallTemplate, rm.rpmTools["microdnf"], pkgs)
default:
err := errors.New("unexpected: no package manager tools were found for patching")
Expand Down

0 comments on commit 473202f

Please sign in to comment.