Workaround for overwriting setuptools on RHEL
This old setuptools egg-info file causes havoc and really weird pip
install errors. I think possibly not everyone has the
python-setuptools package installed, so it may only appear in some
situations.
Change-Id: I7ef0fa35c650e323a8945ed7c5c7754ca62a0ca5
diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh
index f1dc76a..8b1e4df 100755
--- a/tools/fixup_stuff.sh
+++ b/tools/fixup_stuff.sh
@@ -124,6 +124,14 @@
if [[ $DISTRO =~ (rhel6) ]]; then
+ # install_pip.sh installs the latest setuptools over the packaged
+ # version. We can't really uninstall the packaged version if it
+ # is there, because it may remove other important things like
+ # cloud-init. Things work, but there can be an old egg file left
+ # around from the package that causes some really strange
+ # setuptools errors. Remove it, if it is there
+ sudo rm -f /usr/lib/python2.6/site-packages/setuptools-0.6*.egg-info
+
# If the ``dbus`` package was installed by DevStack dependencies the
# uuid may not be generated because the service was never started (PR#598200),
# causing Nova to stop later on complaining that ``/var/lib/dbus/machine-id``