yum-minimal: Don't install yum, install libcurl

Don't install the "yum" package, which is a backwards compat around
dnf.  With 687003f we should not need the backwards compat links any
more.

Add libcurl to avoid conficts with in the curl "-minimal" packages
that happens on CentOS 8.  But skip it on Fedora, because it seems to
create more problems there (not going to pretend it isn't all a
hack ... but it seems to work).

Change-Id: I1de2703eb5075a0a22837b6898bd8eb960d080dd
This commit is contained in:
Ian Wienand 2019-09-25 03:49:55 +00:00
parent b57714af75
commit 5f3b7cd7b7

View File

@ -253,12 +253,25 @@ sudo mount --bind $YUM_CACHE $TMP_MOUNT_PATH/tmp/yum
_install_repos
# install dnf for >= f22
if [ $DIB_RELEASE -ge 22 ]; then
# Fedora 27 has a "curl-minimal" package that will get pulled in as a
# rpm dependency. This causes problems later if/when "curl" gets
# installed. To avoid this, just install the full curl first up.
_install_pkg_manager dnf dnf-plugins-core yum curl
# Install package manager
# We are somewhat fighting against the "yum" version on the host to
# get things installed correctly. Fedora 27 onwards has a
# "curl-minimal" package that will get pulled in by default for the
# initial install (ianw: I think because the yum doesn't understand
# weak dependencies correctly). This causes problems later if/when
# "curl" gets installed (you need to add --allowerasing to let dnf get
# rid of the old package). To avoid this, just install the full curl
# and first up. On Centos, it's different again and we need to
# specify libcurl as well, or the minimal libcurl packages come in
# causing similar problems. *But* -- we can't also do that on Fedora
# it seems, as it seems like as part of the Fedora modular updates
# (https://docs.fedoraproject.org/en-US/modularity/) we can pick up
# seemingly mismatched libraries.
if [[ ${DISTRO_NAME} == 'fedora' ]]; then
_install_pkg_manager dnf dnf-plugins-core curl
elif [[ ${DISTRO_NAME} == centos && $DIB_RELEASE -ge 8 ]]; then
_install_pkg_manager dnf dnf-plugins-core curl libcurl
else
_install_pkg_manager yum
fi