@@ -616,7 +616,31 @@ install_doc_rpm() {
616616 install_package perl-File-Copy perl-Log-Log4perl perl-Config-IniFiles
617617 fi
618618 fi
619- install_package docs-ohpc
619+
620+ # Starting with OpenHPC 4.1, docs-ohpc is only built for EL_10.
621+ # When using the Factory repository on other distributions,
622+ # download the noarch RPM from the EL_10 Factory repository
623+ # and install it locally.
624+ if [[ " ${Repo} " == " Factory" ]] && [[ " ${os_repo} " != " EL_10" ]] &&
625+ { [[ " ${VERSION_MAJOR} " -eq 4 && " ${VERSION_MINOR} " -ge 1 ]] ||
626+ [[ " ${VERSION_MAJOR} " -gt 4 ]]; }; then
627+ local EL10_REPO_URL
628+ EL10_REPO_URL=" http://obs.openhpc.community:82/OpenHPC${VERSION_MAJOR} :/${Version} :/Factory/EL_10/"
629+ echo " docs-ohpc is only built for EL_10, downloading from ${EL10_REPO_URL} "
630+ local DOCS_TMPDIR
631+ DOCS_TMPDIR=$( mktemp -d)
632+ loop_command dnf download -y \
633+ --repofrompath=" ohpc-el10,${EL10_REPO_URL} " \
634+ --repo=ohpc-el10 --disablerepo=' *' \
635+ --downloaddir=" ${DOCS_TMPDIR} " \
636+ --setopt=" ohpc-el10.gpgcheck=0" \
637+ docs-ohpc
638+ " ${PKG_MANAGER} " " ${YES} " install " ${DOCS_TMPDIR} " /docs-ohpc* .rpm ||
639+ ERROR " Unable to install docs-ohpc"
640+ rm -rf " ${DOCS_TMPDIR} "
641+ else
642+ install_package docs-ohpc
643+ fi
620644
621645 if [ -n " ${overwrite_rpm} " ]; then
622646 rpm -Uhv " ${overwrite_rpm} " --force
0 commit comments