670df3326d
The base URL of EPEL repository installed by the epel-release package in CentOS 8 at least now defaults to https. The error seen when building an CentOS 8 image was: "Error: Cannot find a valid baseurl for repo: epel" This patch fixes it so that it will always match regardless of being http or https. Change-Id: I9ec5536ee72047c929a1ef6950ff4e9092842a4c
16 lines
463 B
Bash
Executable File
16 lines
463 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-}
|
|
|
|
[ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0
|
|
|
|
# Only set the mirror for the Base, Extras and Updates repositories
|
|
# The others arn't enabled and do not exist on all mirrors
|
|
sed -e "s|^#baseurl=http[s]*://mirror.centos.org/centos|baseurl=$DIB_DISTRIBUTION_MIRROR|;/^mirrorlist=/d" -i /etc/yum.repos.d/CentOS-Base.repo
|