summaryrefslogtreecommitdiff
path: root/tools/read-dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'tools/read-dependencies')
-rwxr-xr-xtools/read-dependencies8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/read-dependencies b/tools/read-dependencies
index 666e24f5..fd1946a5 100755
--- a/tools/read-dependencies
+++ b/tools/read-dependencies
@@ -34,6 +34,13 @@ MAYBE_RELIABLE_YUM_INSTALL = [
'sh', '-c',
"""
error() { echo "$@" 1>&2; }
+ configure_repos_for_proxy_use() {
+ grep -q "^proxy=" /etc/yum.conf || return 0
+ error ":: http proxy in use => forcing the use of fixed URLs in /etc/yum.repos.d/*.repo"
+ sed -i --regexp-extended '/^#baseurl=/s/#// ; /^(mirrorlist|metalink)=/s/^/#/' /etc/yum.repos.d/*.repo
+ sed -i 's/download\.fedoraproject\.org/dl.fedoraproject.org/g' /etc/yum.repos.d/*.repo
+ }
+ configure_repos_for_proxy_use
n=0; max=10;
bcmd="yum install --downloadonly --assumeyes --setopt=keepcache=1"
while n=$(($n+1)); do
@@ -48,6 +55,7 @@ MAYBE_RELIABLE_YUM_INSTALL = [
done
error ":: running yum install --cacheonly --assumeyes $*"
yum install --cacheonly --assumeyes "$@"
+ configure_repos_for_proxy_use
""",
'reliable-yum-install']