mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-25 14:41:25 +00:00
Map OracleLinux stream names to RHEL.
OracleLinux renames a nubmer of module streams from rhel8 to ol8 and from rhel to ol. This commit maps the names back to rhel8 and rhel so that migrate2rocky doesn't blow up on them.
This commit is contained in:
parent
bc7a35a1e7
commit
6d21220c31
@ -412,6 +412,14 @@ collect_system_info () {
|
|||||||
libselinux-python:2.8
|
libselinux-python:2.8
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Some OracleLinux modules have stream names of ol8 instead of rhel8 and ol
|
||||||
|
# instead of rhel. This is a map that does a glob match and replacement.
|
||||||
|
local -A module_re_map
|
||||||
|
module_glob_map=(
|
||||||
|
['%:ol8']=:rhel8
|
||||||
|
['%:ol']=:rhel
|
||||||
|
);
|
||||||
|
|
||||||
# We need to map rockylinux repository names to the equivalent repositories
|
# We need to map rockylinux repository names to the equivalent repositories
|
||||||
# in the source distro. To do that we look for known packages in each
|
# in the source distro. To do that we look for known packages in each
|
||||||
# repository and see what repo they came from. We need to use repoquery for
|
# repository and see what repo they came from. We need to use repoquery for
|
||||||
@ -559,6 +567,15 @@ $'because continuing with the migration could cause further damage to system.'
|
|||||||
' | sort -u
|
' | sort -u
|
||||||
set +e +o pipefail
|
set +e +o pipefail
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Map the known module name differences.
|
||||||
|
for i in "${!enabled_modules[@]}"; do
|
||||||
|
for gl in "${!module_glob_map[@]}"; do
|
||||||
|
repl=${module_glob_map[$gl]}
|
||||||
|
enabled_modules[$i]=${enabled_modules[$i]/$gl/$repl}
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
# Remove entries matching any excluded modules.
|
# Remove entries matching any excluded modules.
|
||||||
if (( ${#module_excludes[@]} )); then
|
if (( ${#module_excludes[@]} )); then
|
||||||
printf '%s\n' '' "Excluding modules:" "${module_excludes[@]}"
|
printf '%s\n' '' "Excluding modules:" "${module_excludes[@]}"
|
||||||
|
Loading…
Reference in New Issue
Block a user