yum-minimal: clean up release package installs
This started a long way from here, when I noticed that "top" on centos 9-stream images wasn't working because ncurses-base wasn't installed. This led me to the extant install of bash/glibc/ncurses-libs from Iecf7f7e4c992bb23437b6461cdd04cdca96aafa6. However it didn't really explain why these are brought in here. Reading further it became clearer that over the years of distribution additions, Fedora updates, etc. this has grown into a bit of a mess. Refactor the release package installs into a more logical flow, pulling out checks/comments for Fedora's of ancient history, etc. Remove the 9-stream package installs; this isn't the place for them, and the should be brought in by the base packages. Ultimately, this is intendend to a be a no-op refactor. Change-Id: Ie7d9a6497d0d20a3303ec0da3d0668c74efa2c3d
This commit is contained in:
parent
64bdd24e4e
commit
27903f90e2
@ -85,39 +85,24 @@ function _install_repos {
|
|||||||
# (see above) so ...
|
# (see above) so ...
|
||||||
packages="${DIB_YUM_MINIMAL_BOOTSTRAP_PACKAGES:-} "
|
packages="${DIB_YUM_MINIMAL_BOOTSTRAP_PACKAGES:-} "
|
||||||
packages+="basesystem filesystem setup "
|
packages+="basesystem filesystem setup "
|
||||||
if [[ ${DISTRO_NAME} = fedora && ${DIB_RELEASE} -gt 29 ]]; then
|
if [[ ${DISTRO_NAME} = fedora ]]; then
|
||||||
packages+="fedora-release-cloud fedora-release-common "
|
packages+="fedora-release-cloud fedora-release-common "
|
||||||
elif [[ ${DISTRO_NAME} == 'centos' && ${DIB_RELEASE} = '9-stream' ]]; then
|
packages+="fedora-repos fedora-gpg-keys"
|
||||||
packages+="bash glibc ncurses-libs "
|
elif [[ ${DISTRO_NAME} = centos && ${DIB_RELEASE%-stream} -gt 7 ]]; then
|
||||||
elif [[ ${DISTRO_NAME} == 'openeuler' ]]; then
|
|
||||||
packages+="openEuler-release "
|
|
||||||
else
|
|
||||||
packages+="${DISTRO_NAME}-release "
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Starting in F21 this was split into a separate package
|
|
||||||
if [[ ${DISTRO_NAME} == 'fedora' ]]; then
|
|
||||||
packages+="fedora-repos "
|
|
||||||
fi
|
|
||||||
|
|
||||||
# F27 started putting gpg keys into this separate package
|
|
||||||
if [[ ${DISTRO_NAME} = fedora && ${DIB_RELEASE} -gt 26 ]]; then
|
|
||||||
packages+="fedora-gpg-keys "
|
|
||||||
fi
|
|
||||||
|
|
||||||
# CentOS 8.1 split repositories and GPG keys out into subpackages
|
|
||||||
if [[ ${DISTRO_NAME} = centos && ${DIB_RELEASE%-stream} -gt 7 ]]; then
|
|
||||||
packages+="centos-gpg-keys "
|
packages+="centos-gpg-keys "
|
||||||
if [[ "$DIB_RELEASE" =~ (stream) ]]; then
|
if [[ "$DIB_RELEASE" =~ (stream) ]]; then
|
||||||
packages+="centos-stream-release centos-stream-repos "
|
packages+="centos-stream-release centos-stream-repos "
|
||||||
else
|
else
|
||||||
packages+="centos-linux-release centos-linux-repos "
|
packages+="centos-linux-release centos-linux-repos "
|
||||||
fi
|
fi
|
||||||
fi
|
elif [[ ${DISTRO_NAME} == 'openeuler' ]]; then
|
||||||
|
packages+="openEuler-release "
|
||||||
# For openEuler, install other required repos and gpy-keys packages.
|
|
||||||
if [[ ${DISTRO_NAME} == 'openeuler' ]]; then
|
|
||||||
packages+="openEuler-repos openEuler-gpg-keys "
|
packages+="openEuler-repos openEuler-gpg-keys "
|
||||||
|
else
|
||||||
|
# NOTE(ianw) 2022-04-20 : can probably remove when we don't
|
||||||
|
# support centos 7, unlikely anything else ends up here at
|
||||||
|
# this point.
|
||||||
|
packages+="${DISTRO_NAME}-release "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# By default, parent elements (fedora-minimal, centos-minimal)
|
# By default, parent elements (fedora-minimal, centos-minimal)
|
||||||
|
Loading…
Reference in New Issue
Block a user