Merge "download_mirror.sh fails with 404 errors"
This commit is contained in:
commit
e55ced2404
@ -21,6 +21,8 @@ FROM centos:7.4.1708
|
||||
# echo -e "export http_proxy=$http_proxy\nexport https_proxy=$https_proxy\n\
|
||||
#export ftp_proxy=$ftp_proxy" >> /root/.bashrc
|
||||
|
||||
RUN echo "http_caching=packages" >> /etc/yum.conf
|
||||
|
||||
# username you will docker exec into the container as.
|
||||
# It should NOT be your host username so you can easily tell
|
||||
# if you are in our out of the container.
|
||||
|
@ -251,7 +251,24 @@ download () {
|
||||
|
||||
|
||||
# Prime the cache
|
||||
${SUDOCMD} yum ${YUMCONFOPT} ${RELEASEVER} makecache
|
||||
loop_count=0
|
||||
max_loop_count=5
|
||||
echo "${SUDOCMD} yum ${YUMCONFOPT} ${RELEASEVER} makecache"
|
||||
while ! ${SUDOCMD} yum ${YUMCONFOPT} ${RELEASEVER} makecache ; do
|
||||
# To protect against intermittent 404 errors, we'll retry
|
||||
# a few times. The suspected issue is pulling repodata
|
||||
# from multiple source that are temporarily inconsistent.
|
||||
loop_count=$((loop_count + 1))
|
||||
if [ $loop_count -gt $max_loop_count ]; then
|
||||
break
|
||||
fi
|
||||
echo "makecache retry: $loop_count"
|
||||
|
||||
# Wipe the inconsistent data from the last try
|
||||
echo "yum ${YUMCONFOPT} ${RELEASEVER} clean all"
|
||||
yum ${YUMCONFOPT} ${RELEASEVER} clean all
|
||||
done
|
||||
|
||||
|
||||
# Download files
|
||||
if [ -s "$rpms_list" ];then
|
||||
|
@ -13,6 +13,7 @@ bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://b
|
||||
distroverpkg=centos-release
|
||||
override_install_langs=en_US.utf8
|
||||
tsflags=nodocs
|
||||
http_caching=packages
|
||||
reposdir=yum.repos.d
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user