From ce410de834b70c333fe83dc6431a1c6429fd040a Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 20 Sep 2016 09:18:00 +1000 Subject: [PATCH] yum-minimal: Disable excludes when installing pkg manager Because we are using the building platform's "yum" to do the initial install into the chroot, it is affected by the base-system's /etc/yum.conf. pip-and-virtaulenv in I82acb865378a0fa5903a6267bfcee0e2962eced0 added "exclude=python-pip..." in /etc/yum.conf to stop the package manager overwriting the installed pip. Now our CI images have built with this, we are now picking up this exclude on centos. Since on F24 dnf->python->python-pip we end up failing to build the the chroot because python-pip can not be satisifed. In a general sense, however, this could be caused by any configuration put into /etc/yum.conf that is incompatible with installing into the chroot. yum has the option to disable all excludes which is used here. This seems to be the best way to isolate the chroot install from any excludes that may have been done on the base system for various reasons. I did consider using a completely separate yum.conf we ship with dib ... but let's start simple. This should fix the current gate failures on centos Change-Id: I4e4cc8ed09a29c4057ade34ea93025139e191bf5 --- elements/yum-minimal/root.d/08-yum-chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/elements/yum-minimal/root.d/08-yum-chroot b/elements/yum-minimal/root.d/08-yum-chroot index 074bb331..50c0a6b2 100755 --- a/elements/yum-minimal/root.d/08-yum-chroot +++ b/elements/yum-minimal/root.d/08-yum-chroot @@ -156,6 +156,7 @@ function _install_pkg_manager { fi sudo -E yum -y \ + --disableexcludes=all \ --setopt=cachedir=$YUM_CACHE/$ARCH/$DIB_RELEASE \ --setopt=reposdir=$TARGET_ROOT/etc/yum.repos.d \ --releasever=$DIB_RELEASE \