From 8413920bd851dfa0aeeb1ee829ae1f487ff0445b Mon Sep 17 00:00:00 2001 From: lw520203 <1823363429@qq.com> Date: Tue, 9 Sep 2025 14:50:39 +0800 Subject: [PATCH] clean build env --- script/step/make_devstation_iso.sh | 12 +++++++++++- script/step/make_devstation_netinst_iso.sh | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/script/step/make_devstation_iso.sh b/script/step/make_devstation_iso.sh index 36397e7..543b2f5 100644 --- a/script/step/make_devstation_iso.sh +++ b/script/step/make_devstation_iso.sh @@ -27,10 +27,20 @@ function make_devstation_iso_inchroot() TIME_DIR="${release_dir#${HTTP_DIR}}" TIME=${TIME_DIR##*/} TIME=${TIME#"${version}"-} + TMP_OEMAKER="/opt/oemaker" yum_conf="${BUILD_SCRIPT_DIR}/config/repo_conf/repofile.conf" yum clean all -c "${yum_conf}" - yum remove -y oemaker lorax || true + echo "start remove/rpm -e oemaker and lorax" + if yum remove -y oemaker lorax;then + echo "yum remove success" + else + if rpm -e --nodeps oemaker lorax;then + rm -rf "${TMP_OEMAKER}" + echo "rpm -e success" + fi + fi + yum install -y oemaker lorax -c "${yum_conf}" # 配置 repo 源 diff --git a/script/step/make_devstation_netinst_iso.sh b/script/step/make_devstation_netinst_iso.sh index 81b08de..156e07f 100644 --- a/script/step/make_devstation_netinst_iso.sh +++ b/script/step/make_devstation_netinst_iso.sh @@ -27,10 +27,20 @@ function make_devstation_netinst_iso_inchroot() TIME_DIR="${release_dir#${HTTP_DIR}}" TIME=${TIME_DIR##*/} TIME=${TIME#"${version}"-} + TMP_OEMAKER="/opt/oemaker" yum_conf="${BUILD_SCRIPT_DIR}/config/repo_conf/repofile.conf" yum clean all -c "${yum_conf}" - yum remove -y oemaker lorax || true + echo "start remove/rpm -e oemaker and lorax" + if yum remove -y oemaker lorax;then + echo "yum remove success" + else + if rpm -e --nodeps oemaker lorax;then + rm -rf "${TMP_OEMAKER}" + echo "rpm -e success" + fi + fi + yum install -y oemaker lorax -c "${yum_conf}" # 配置 repo 源 -- Gitee