From: Sage Weil Date: Fri, 14 Jun 2013 15:29:01 +0000 (-0700) Subject: install: make install idempotent X-Git-Tag: v1.2~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=56bfa3deffd350705466bccd22f4a0112e8ae3b8;p=ceph-deploy.git install: make install idempotent If the same version is already installed, we should succeed, not fail. Also, fix up the whitespace so diffs are easier to read. Signed-off-by: Sage Weil --- diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index bd677ef..d3bc8f5 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -43,9 +43,15 @@ def install_suse(release, codename, version_kind, version): ) subprocess.check_call( - args=['rpm', '-Uvh','--quiet', '{url}noarch/ceph-release-1-0.noarch.rpm'.format( - url=url - )] + args=[ + 'rpm', + '-Uvh', + '--replacepkgs', + '--quiet', + '{url}noarch/ceph-release-1-0.noarch.rpm'.format( + url=url, + ), + ] ) subprocess.check_call( @@ -133,10 +139,16 @@ def install_fedora(release, codename, version_kind, version): ) subprocess.check_call( - args=['rpm', '-Uvh','--quiet', '{url}noarch/ceph-release-1-0.fc{release}.noarch.rpm'.format( - url=url, - release=release, - )] + args=[ + 'rpm', + '-Uvh', + '--replacepkgs', + '--quiet', + '{url}noarch/ceph-release-1-0.fc{release}.noarch.rpm'.format( + url=url, + release=release, + ), + ] ) subprocess.check_call( @@ -198,9 +210,15 @@ def install_centos(release, codename, version_kind, version): ) subprocess.check_call( - args=['rpm', '-Uvh','--quiet', '{url}noarch/ceph-release-1-0.el6.noarch.rpm'.format( - url=url - )] + args=[ + 'rpm', + '-Uvh', + '--replacepkgs', + '--quiet', + '{url}noarch/ceph-release-1-0.el6.noarch.rpm'.format( + url=url, + ), + ] ) subprocess.check_call(