Browse code

Fix handling of pip and virtualenv on openSUSE

openSUSE's python-virtualenv rpm depends on the python-pip rpm, but
tools/install_pip.sh prefers to deinstall the latter (if installed) and
install pip directly from upstream source instead.

This deinstallation of python-pip will break if attempted via rpm -e,
since rpm does not transitively remove dependents (in this case
python-virtualenv). In contrast, "zypper rm" does, so we switch to
that.

It is safe to remove the python-virtualenv package, since stack.sh will
install virtualenv via pip instead.

Change-Id: I5bc23de0f2de2e3940c4be3b76b7c0634836239b

Adam Spiers authored on 2013/10/01 23:59:05
Showing 2 changed files
... ...
@@ -10,7 +10,6 @@ python-setuptools # instead of python-distribute; dist:sle11sp2
10 10
 python-cmd2 # dist:opensuse-12.3
11 11
 python-pylint
12 12
 python-unittest2
13
-python-virtualenv
14 13
 screen
15 14
 tar
16 15
 tcpdump
... ...
@@ -926,7 +926,7 @@ function uninstall_package() {
926 926
     elif is_fedora; then
927 927
         sudo yum remove -y "$@"
928 928
     elif is_suse; then
929
-        sudo rpm -e "$@"
929
+        sudo zypper rm "$@"
930 930
     else
931 931
         exit_distro_not_supported "uninstalling packages"
932 932
     fi