Skip to content

Commit

Permalink
update tag for almalinux test image
Browse files Browse the repository at this point in the history
switch to use alma vs almalinux

Signed-off-by: Christina Waldron <[email protected]>
  • Loading branch information
cnwaldron committed Jan 29, 2025
1 parent 3af54af commit fb1f447
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion integration/fixtures/test-images.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
},
{
"image": "docker.io/almalinux",
"tag": "9.4",
"tag": "9.4-20240923",
"digest": "sha256:1c718a4cd7bab3bdb069ddbbd1eb593a390e6932d51d0048a2f6556303bafba7",
"distro": "AlmaLinux",
"description": "Valid rpm DB, microdnf & rpm present",
Expand Down
6 changes: 3 additions & 3 deletions pkg/patch/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func patchWithContext(ctx context.Context, ch chan error, image, reportFile, pat
"Please use a different RPM-based image")
return err

case strings.Contains(solveOpt.SourcePolicy.Rules[0].Updates.Identifier, "almalinux"):
case strings.Contains(solveOpt.SourcePolicy.Rules[0].Updates.Identifier, "alma"):
err = errors.New("AlmaLinux is not supported via source policies due to BusyBox not being in the AlmaLinux repos\n" +
"Please use a different RPM-based image")
return err
Expand Down Expand Up @@ -348,8 +348,8 @@ func getOSType(ctx context.Context, osreleaseBytes []byte) (string, error) {
return "rocky", nil
case strings.Contains(osType, "oracle"):
return "oracle", nil
case strings.Contains(osType, "almalinux"):
return "almalinux", nil
case strings.Contains(osType, "alma"):
return "alma", nil
default:
log.Error("unsupported osType ", osType)
return "", errors.ErrUnsupported
Expand Down
2 changes: 1 addition & 1 deletion pkg/patch/patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func TestGetOSType(t *testing.T) {
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"`),
err: nil,
expectedOSType: "almalinux",
expectedOSType: "alma",
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/pkgmgr/pkgmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func GetPackageManager(osType string, osVersion string, config *buildkit.Config,
workingFolder: workingFolder,
osVersion: osVersion,
}, nil
case "cbl-mariner", "azurelinux", "centos", "oracle", "redhat", "rocky", "amazon", "almalinux":
case "cbl-mariner", "azurelinux", "centos", "oracle", "redhat", "rocky", "amazon", "alma":
return &rpmManager{
config: config,
workingFolder: workingFolder,
Expand Down

0 comments on commit fb1f447

Please sign in to comment.