diff --git a/script/step/make_devstation_iso.sh b/script/step/make_devstation_iso.sh index 36397e72aa1bb126b65eb2485119fef654d78a37..543b2f5bef3ee2279544775870da76a881b41d02 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 81b08de3c2b94f66bfb6e78f943c6797713d95f6..156e07fabaa980b10fe5d5bee234674b7deccac3 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 源