Skip to content

Commit

Permalink
distro/aliyun: abstract install function
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Jan 9, 2025
1 parent 4aad879 commit db9d211
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions distro/aliyun
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ shopt -s nullglob
. $LKP_SRC/distro/common
. $LKP_SRC/lib/debug.sh

install()
{
local pkg="$1"

rpm --quiet --query "$pkg" || $LKP_SRC/distro/installer/$DISTRO "$pkg"
}

distro_install_depends()
{
local script
Expand All @@ -27,7 +34,7 @@ distro_install_depends()

for pkg in $packages
do
rpm --quiet --query $pkg || $LKP_SRC/distro/installer/$DISTRO $pkg
install $pkg
done
}

Expand Down Expand Up @@ -111,9 +118,11 @@ install_gcc7()
wget -O /tmp/centos-release-scl-rh-2-3.el7.centos.noarch.rpm https://rpmfind.net/linux/centos/7/extras/x86_64/Packages/centos-release-scl-rh-2-3.el7.centos.noarch.rpm
rpm -ivh --ignoresize /tmp/centos-release-scl-rh-2-3.el7.centos.noarch.rpm
else
$LKP_SRC/distro/installer/$DISTRO centos-release-scl-rh
install centos-release-scl-rh
fi

$LKP_SRC/distro/installer/$DISTRO "devtoolset-7-gcc*"

source /opt/rh/devtoolset-7/enable
}

Expand All @@ -122,7 +131,7 @@ download_ocfs2_tools()
local pkgs=$1

mkdir -p /opt/rpms
$LKP_SRC/distro/installer/$DISTRO wget
install wget

wget -nc -P /opt/rpms https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/ocfs2-tools-1.8.6-11.el7.x86_64.rpm

Expand Down

0 comments on commit db9d211

Please sign in to comment.