Skip to content

Commit

Permalink
Fix the architecture in case of RHEL-based products
Browse files Browse the repository at this point in the history
  • Loading branch information
mackdk committed Oct 16, 2023
1 parent 73bd92f commit 65e10cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,17 @@ else if (Set.of("redhat", "centos", "oel", "alibaba cloud (aliyun)", "almalinux"

Optional<RedhatProductInfo> redhatProductInfo = systemQuery.redhatProductInfo(minionId);

String productArch = arch.replace("-redhat-linux", "");
Optional<RhelUtils.RhelProduct> rhelProduct =
redhatProductInfo.flatMap(x -> RhelUtils.detectRhelProduct(
channels, arch, x.getWhatProvidesRes(), x.getWhatProvidesSLL(), x.getRhelReleaseContent(),
x.getCentosReleaseContent(), x.getOracleReleaseContent(), x.getAlibabaReleaseContent(),
x.getAlmaReleaseContent(), x.getAmazonReleaseContent(), x.getRockyReleaseContent()));
redhatProductInfo.flatMap(x -> RhelUtils.detectRhelProduct(
channels, productArch, x.getWhatProvidesRes(), x.getWhatProvidesSLL(), x.getRhelReleaseContent(),
x.getCentosReleaseContent(), x.getOracleReleaseContent(), x.getAlibabaReleaseContent(),
x.getAlmaReleaseContent(), x.getAmazonReleaseContent(), x.getRockyReleaseContent()));
return Opt.stream(rhelProduct).flatMap(rhel -> {

if (rhel.getSuseBaseProduct().isEmpty()) {
LOG.warn("No product match found for: {} {} {} {}", rhel.getName(), rhel.getVersion(),
rhel.getRelease(), arch);
rhel.getRelease(), productArch);
return Stream.empty();
}
return rhel.getAllSuseProducts().stream();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed detection in case RHEL-based products (bsc#1214280)

0 comments on commit 65e10cb

Please sign in to comment.