Commit e989faa9 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

scripts/pkgdep: [rhel] Add warning about working under RHEL system



Additionally, fall through potential yum failures to try and install
what's available in repos given system is using.

Change-Id: Icf7f5f3db1d72b67414c7d7e4badb8416a9d25b1
Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3873


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 1338e698
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash

disclaimer() {
	case "$ID" in
		rhel)
			cat <<- WARN

				WARNING: $PRETTY_NAME system detected.

				Please, note that the support for this platform is considered to be "best-effort",
				as in, access to some packages may be limited and/or missing. Review your repo
				setup to make sure installation of all dependencies is possible.

			WARN

			# Don't trigger errexit, simply install what's available. This is default
			# behavior of older yum versions (e.g. the one present on RHEL 7.x) anyway.
			yum() { "$(type -P yum)" --skip-broken "$@"; }
			;;

		*) ;;
	esac
}

disclaimer

# First, add extra EPEL repo to have a chance of covering most of the packages
# on the enterprise systems, like RHEL.
if [[ $ID == centos || $ID == rhel ]]; then