Skip to content

Commit bc6f10b

Browse files
Jiaqirli9
Jiaqi
authored andcommitted
lkp-exec/install: add OS version check and mirror source for centos
fix for the following error: [root@localhost lkp-tests]# lkp install Use: /root/lkp-tests/distro/installer/centos install bc gawk gzip kmod numactl rsync time which automake bison bsdtar bzip2 ca-certificates cpio fakeroot flex gcc git glibc-devel glibc-static glibc-devel.i686 glibc-static.i686 libtool make make automake gcc gcc-c++ kernel-devel rpm-build openssl openssl-devel patch perf perl-IPC-Run rsync ruby ruby-devel wget ...... 软件包 git-2.39.3-1.el9.x86_64 已安装。 软件包 glibc-devel-2.34-95.el9.x86_64 已安装。 未找到匹配的参数: glibc-static 未找到匹配的参数: glibc-static.i686 软件包 libtool-2.4.6-45.el9.x86_64 已安装。 ...... 软件包 openssl-1:3.0.7-25.el9.x86_64 已安装。 未找到匹配的参数: perl-IPC-Run 软件包 wget-1.21.1-7.el9.x86_64 已安装。 错误:没有任何匹配: glibc-static glibc-static.i686 perl-IPC-Run Cannot install some packages of lkp depends Signed-off-by: Jiaqi <[email protected]>
1 parent 39ca0c4 commit bc6f10b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

lkp-exec/install

+20
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,31 @@ install_base_support()
351351
create_host_config
352352
}
353353

354+
enable_centos_source(){
355+
if ! yum list installed | grep -q yum-utils; then
356+
yum install -y yum-utils
357+
fi
358+
359+
if [ "$_system_version" = 9 ]; then
360+
echo "enable source crb"
361+
dnf config-manager --set-enabled crb
362+
elif [ "$_system_version" = 8 ]; then
363+
echo "enable source powertools"
364+
dnf config-manager --set-enabled powertools
365+
fi
366+
367+
}
368+
354369
. $LKP_SRC/lib/install.sh
355370

356371
detect_system
357372
distro=$_system_name_lowercase
358373

374+
echo "distro=$distro"
375+
echo "version=$_system_version"
376+
377+
[ "$distro" = "centos" ] && enable_centos_source
378+
359379
DISTRO=$distro
360380
export DISTRO
361381

0 commit comments

Comments
 (0)