Switch incorrect symlink order

All this did was symlnk pip2 to pip, which became installed by python3
on our previous run.

We need to properly revert this on our production systems now.

Change-Id: Ie27c4476ecea9d0a29f40400bbc3bdbe704905a6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-06-01 08:25:10 -04:00 committed by Colleen Murphy
parent 35a83454f2
commit 47ec7c8e0c

View File

@ -30,11 +30,22 @@ class pip (
# NOTE(pabelanger): Default to pip2 for backwards compat # NOTE(pabelanger): Default to pip2 for backwards compat
exec { $::pip::params::get_pip_path: exec { $::pip::params::get_pip_path:
command => "ln -sf ${::pip::params::get_pip_path} ${::pip::params::get_pip2_path}", command => "ln -sf ${::pip::params::get_pip2_path} ${::pip::params::get_pip_path}",
path => '/usr/bin:/bin/', path => '/usr/bin:/bin/',
refreshonly => true, refreshonly => true,
} }
# NOTE(pabelanger): We need to unlink pip2 because, it just symlinks to pip.
# And it is possible that pip is currently python3. This should then cause
# download-pip to run again. And default pip to python2 again.
# This code will be removed once pip has been switched back to python2.
exec { 'unlink pip2':
command => "unlink ${::pip::params::get_pip2_path}",
path => '/usr/bin:/bin/',
onlyif => "test -L ${::pip::params::get_pip2_path}",
notify => Exec['download-pip'],
}
if $manage_pip_conf { if $manage_pip_conf {
file { '/etc/pip.conf': file { '/etc/pip.conf':
owner => 'root', owner => 'root',