]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
install: make install idempotent
authorSage Weil <sage@inktank.com>
Fri, 14 Jun 2013 15:29:01 +0000 (08:29 -0700)
committerSage Weil <sage@inktank.com>
Fri, 14 Jun 2013 15:29:01 +0000 (08:29 -0700)
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 <sage@inktank.com>
ceph_deploy/install.py

index bd677efe1f3867efaa6bf2ed3e1f062a44eed0b6..d3bc8f5d5e3e8baf501adc7bc27d745403f007f2 100644 (file)
@@ -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(