CreateImageWizard: package search through correct architecture
Instead of always searching through x86 repos, search through the repos of the selected architecture. This fixes HMS-3066.
This commit is contained in:
parent
e60afdbe27
commit
6739851897
1 changed files with 4 additions and 5 deletions
|
|
@ -63,6 +63,7 @@ const ExactMatch = ({
|
|||
export const RedHatPackages = ({ defaultArch }) => {
|
||||
const { getState } = useFormApi();
|
||||
const distribution = getState()?.values?.release;
|
||||
const arch = getState()?.values?.arch;
|
||||
const { data: distributionInformation, isSuccess: isSuccessDistroInfo } =
|
||||
useGetArchitecturesQuery({ distribution });
|
||||
|
||||
|
|
@ -70,12 +71,10 @@ export const RedHatPackages = ({ defaultArch }) => {
|
|||
// if the env is stage beta then use content-sources api
|
||||
// else use image-builder api
|
||||
if (getState()?.values?.contentSourcesEnabled) {
|
||||
const filteredArchx86_64 = distributionInformation.find(
|
||||
(info) => info.arch === 'x86_64'
|
||||
);
|
||||
const repoUrls = filteredArchx86_64.repositories.map(
|
||||
(repo) => repo.baseurl
|
||||
const filteredByArch = distributionInformation.find(
|
||||
(info) => info.arch === arch
|
||||
);
|
||||
const repoUrls = filteredByArch.repositories.map((repo) => repo.baseurl);
|
||||
return await api.getPackagesContentSources(repoUrls, packagesSearchName);
|
||||
} else {
|
||||
const args = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue