Signed-off-by: Wang Chenglong 18509160991@163.com --- container/docker-rootfs/setup-image | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/container/docker-rootfs/setup-image b/container/docker-rootfs/setup-image index 787a42c..62e1c05 100755 --- a/container/docker-rootfs/setup-image +++ b/container/docker-rootfs/setup-image @@ -2,10 +2,19 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+. $LKP_SRC/lib/env.sh + install_packages() { - yum install -y --skip-broken $(</tmp/packages-to-install) - yum clean all + if [ has_cmd yum ]; then + yum install -y --skip-broken $(</tmp/packages-to-install) + yum clean all + elif [ has_cmd apt-get ]; then + apt update + apt-get install -y --fix-missing $(</tmp/packages-to-install) + elif [ has_cmd pacman ]; then + pacman -Syu --noconfirm $(</tmp/packages-to-install) + fi }
remove_file()
Pls ignore this email.
On Thu, Dec 24, 2020 at 12:01:22PM +0800, Wang Chenglong wrote:
Signed-off-by: Wang Chenglong 18509160991@163.com
container/docker-rootfs/setup-image | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/container/docker-rootfs/setup-image b/container/docker-rootfs/setup-image index 787a42c..62e1c05 100755 --- a/container/docker-rootfs/setup-image +++ b/container/docker-rootfs/setup-image @@ -2,10 +2,19 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+. $LKP_SRC/lib/env.sh
install_packages() {
- yum install -y --skip-broken $(</tmp/packages-to-install)
- yum clean all
- if [ has_cmd yum ]; then
yum install -y --skip-broken $(</tmp/packages-to-install)
yum clean all
- elif [ has_cmd apt-get ]; then
apt update
apt-get install -y --fix-missing $(</tmp/packages-to-install)
- elif [ has_cmd pacman ]; then
pacman -Syu --noconfirm $(</tmp/packages-to-install)
- fi
}
remove_file()
2.23.0