mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-21 20:51:26 +00:00
Fix broken stream conversion logic.
Stream system repo packages were ignored if there were no stream non-system packages present.
This commit is contained in:
parent
d7e4c072a2
commit
230cbc507b
@ -732,7 +732,8 @@ package_swaps() {
|
||||
done
|
||||
|
||||
# CentOS Stream specific processing
|
||||
if (( ${#installed_stream_repos_pkgs[@]} )); then
|
||||
if (( ${#installed_stream_repos_pkgs[@]} ||
|
||||
${#installed_sys_stream_repos_pkgs[@]} )); then
|
||||
# Get a list of the repo files.
|
||||
local -a repos_files
|
||||
readarray -t repos_files < <(
|
||||
@ -741,10 +742,13 @@ package_swaps() {
|
||||
grep '^/etc/yum\.repos\.d/.\+\.repo$'
|
||||
)
|
||||
|
||||
# Remove the package from the rpm db.
|
||||
saferpm -e --justdb --nodeps -a "${installed_sys_stream_repos_pkgs[@]}" ||
|
||||
if (( ${#installed_sys_stream_repos_pkgs[@]} )); then
|
||||
# Remove the package from the rpm db.
|
||||
saferpm -e --justdb --nodeps -a \
|
||||
"${installed_sys_stream_repos_pkgs[@]}" ||
|
||||
exit_message \
|
||||
"Could not remove packages from the rpm db: ${installed_sys_stream_repos_pkgs[@]}"
|
||||
fi
|
||||
|
||||
# Rename the stream repos with a prefix.
|
||||
sed -i 's/^\[/['"$stream_prefix"'/' "${repos_files[@]}"
|
||||
|
Loading…
Reference in New Issue
Block a user