diff --git a/diskimage_builder/elements/gentoo/finalise.d/99-cleanup b/diskimage_builder/elements/gentoo/finalise.d/99-cleanup index 656b0a10d..98e101dc1 100755 --- a/diskimage_builder/elements/gentoo/finalise.d/99-cleanup +++ b/diskimage_builder/elements/gentoo/finalise.d/99-cleanup @@ -18,11 +18,6 @@ emerge --verbose=n --depclean emaint all -f eselect news read all -# clean up files that may have been changed during build -shopt -s extglob -rm -Rf /tmp/!(ccache|in_target*|profiledir*) -shopt -u extglob - rm -Rf /root/.ccache/* /usr/src/* /var/cache/edb/dep/* /var/cache/genkernel/* /var/empty/* /var/run/* /var/state/* /var/tmp/* rm -Rf /etc/*- /etc/*.old /etc/ssh/ssh_host_* /root/.*history /root/.lesshst /root/.ssh/known_hosts /root/.viminfo /usr/share/genkernel /usr/lib64/python*/site-packages/gentoolkit/test/eclean/testdistfiles.tar.gz if [[ "${GENTOO_PORTAGE_CLEANUP}" != "False" ]]; then diff --git a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip index 704fa338b..4014c98f7 100755 --- a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip +++ b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip @@ -6,7 +6,7 @@ fi set -eu set -o pipefail -if [[ $DISTRO_NAME =~ (centos|fedora) ]]; then +if [[ $DISTRO_NAME =~ (opensuse}fedora|centos|centos7|rhel|rhel7) ]]; then # GENERAL WARNING : mixing packaged python libraries with # pip-installed versions always creates issues. Upstream # openstack-infra uses this a lot (especially devstack) but be @@ -16,7 +16,11 @@ if [[ $DISTRO_NAME =~ (centos|fedora) ]]; then # on somebody does a "yum install python-virtualenv" and goes and # overwrites the pip installed version with the packaged version, # leading to all sorts of weird version issues. - ${YUM:-yum} install -y python-virtualenv python-pip python-setuptools + if [[ $DISTRO_NAME = opensuse ]]; then + zypper -n install python-virtualenv python-pip python-setuptools + else + ${YUM:-yum} install -y python-virtualenv python-pip python-setuptools + fi # install pip; this overwrites packaged pip /usr/local/bin/dib-python /tmp/get-pip.py @@ -38,17 +42,28 @@ if [[ $DISTRO_NAME =~ (centos|fedora) ]]; then # doesn't have issues with other system packages. pip install -U virtualenv - # Add this to exclude so that we don't install a later package - # over it if it updates. Note that fedora-minimal, bootstrapped - # via yum, can have an old yum.conf around, so look for dnf first. - if [[ -f /etc/dnf/dnf.conf ]]; then - conf=/etc/dnf/dnf.conf - elif [[ -f /etc/yum.conf ]]; then - conf=/etc/yum.conf + if [[ $DISTRO_NAME = opensuse ]]; then + for pkg in virtualenv pip setuptools; do + cat - >> /etc/zypp/locks <> ${conf} fi - echo "exclude=python-virtualenv,python-pip,python-setuptools" >> ${conf} else /usr/local/bin/dib-python /tmp/get-pip.py pip install virtualenv diff --git a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot index 81d491761..cb7909ae2 100755 --- a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot +++ b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot @@ -37,7 +37,7 @@ function cleanup() { trap cleanup EXIT ZYPPER_TARGET_OPTS="--non-interactive --gpg-auto-import-keys --root $TARGET_ROOT" -ZYPPER_INSTALL_OPTS="--no-confirm --no-recommends" +ZYPPER_INSTALL_OPTS="--no-recommends" for repo in ${ZYPPER_REPOS}; do reponame=repo-${repo%%=>*} diff --git a/requirements.txt b/requirements.txt index 8dcb6ed89..87d25096d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,3 @@ pbr>=1.8 # Apache-2.0 PyYAML>=3.10.0 # MIT flake8<2.6.0,>=2.5.4 # MIT six>=1.9.0 # MIT -oslosphinx>=4.7.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 82df64595..ef82ce7b5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,7 +37,8 @@ mapping_file = babel.cfg output_file = diskimage_builder/locale/diskimage_builder.pot [pbr] -warnerrors = True +# TODO(jaegerandi): Set to True once pbr 1.11.0 is out. +warnerrors = False [update_catalog] domain = diskimage_builder diff --git a/test-requirements.txt b/test-requirements.txt index a30316a7e..931ecaad3 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ oslotest>=1.10.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD # Doc requirements -sphinx!=1.3b1,<1.4,>=1.2.1 # BSD +sphinx>=1.5.1 # BSD oslosphinx>=4.7.0 # Apache-2.0 # releasenotes