mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-21 20:51:26 +00:00
Fix broken mirrorlist URLs from CentOS Stream repos.
The mirrorlist URLs rely on variable replacements from CentOS Stream that are not valid once we have switched to Rocky Linux. To fix this we change to the baseurl instead and fix it up to not rely on those variables that have changed.
This commit is contained in:
parent
678a220c92
commit
6c3453041c
@ -741,8 +741,12 @@ package_swaps() {
|
|||||||
"Could not remove packages from the rpm db: ${installed_sys_stream_repos_pkgs[@]}"
|
"Could not remove packages from the rpm db: ${installed_sys_stream_repos_pkgs[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Rename the stream repos with a prefix.
|
# Rename the stream repos with a prefix and fix the baseurl.
|
||||||
sed -i 's/^\[/['"$stream_prefix"'/' "${repos_files[@]}"
|
sed -i \
|
||||||
|
-e 's/^\[/['"$stream_prefix"'/' \
|
||||||
|
-e 's|^mirrorlist=|#mirrorlist=|g' \
|
||||||
|
-e 's|^#baseurl=http://mirror.centos.org/$contentdir/$stream/|baseurl=|http://mirror.centos.org/centos/8-stream/' \
|
||||||
|
"${repos_files[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use dnf shell to swap the system packages out.
|
# Use dnf shell to swap the system packages out.
|
||||||
|
Loading…
Reference in New Issue
Block a user