From 985debe5cee5ce8c1847b192b98224a66a85c3c2 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 6 Aug 2013 11:45:07 -0300 Subject: [PATCH] Don't uninstall packages when on xenserver It turns out our fix for package madness breaks when running on xenserver. Put in a simple exclusion for that case until we figure out a more total and systemic solution to everyone's problems. Change-Id: I491917015337f83206937c53949a62aa63f4679f --- stack.sh | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/stack.sh b/stack.sh index c9d394c53d..95172c3008 100755 --- a/stack.sh +++ b/stack.sh @@ -601,23 +601,29 @@ if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then sudo setenforce 0 fi - # An old version of ``python-crypto`` (2.0.1) may be installed on a - # fresh system via Anaconda and the dependency chain - # ``cas`` -> ``python-paramiko`` -> ``python-crypto``. - # ``pip uninstall pycrypto`` will remove the packaged ``.egg-info`` file - # but leave most of the actual library files behind in ``/usr/lib64/python2.6/Crypto``. - # Later ``pip install pycrypto`` will install over the packaged files resulting - # in a useless mess of old, rpm-packaged files and pip-installed files. - # Remove the package so that ``pip install python-crypto`` installs cleanly. - # Note: other RPM packages may require ``python-crypto`` as well. For example, - # RHEL6 does not install ``python-paramiko packages``. - uninstall_package python-crypto + # The following workarounds break xenserver + if [ "$VIRT_DRIVER" != 'xenserver' ]; then + # An old version of ``python-crypto`` (2.0.1) may be installed on a + # fresh system via Anaconda and the dependency chain + # ``cas`` -> ``python-paramiko`` -> ``python-crypto``. + # ``pip uninstall pycrypto`` will remove the packaged ``.egg-info`` + # file but leave most of the actual library files behind in + # ``/usr/lib64/python2.6/Crypto``. Later ``pip install pycrypto`` + # will install over the packaged files resulting + # in a useless mess of old, rpm-packaged files and pip-installed files. + # Remove the package so that ``pip install python-crypto`` installs + # cleanly. + # Note: other RPM packages may require ``python-crypto`` as well. + # For example, RHEL6 does not install ``python-paramiko packages``. + uninstall_package python-crypto - # A similar situation occurs with ``python-lxml``, which is required by - # ``ipa-client``, an auditing package we don't care about. The - # build-dependencies needed for ``pip install lxml`` (``gcc``, - # ``libxml2-dev`` and ``libxslt-dev``) are present in ``files/rpms/general``. - uninstall_package python-lxml + # A similar situation occurs with ``python-lxml``, which is required by + # ``ipa-client``, an auditing package we don't care about. The + # build-dependencies needed for ``pip install lxml`` (``gcc``, + # ``libxml2-dev`` and ``libxslt-dev``) are present in + # ``files/rpms/general``. + uninstall_package python-lxml + fi # If the ``dbus`` package was installed by DevStack dependencies the # uuid may not be generated because the service was never started (PR#598200),