]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-12477] centos: more selective install of yum-plugin-priorities
authorTravis Rhoden <trhoden@redhat.com>
Tue, 4 Aug 2015 21:06:36 +0000 (14:06 -0700)
committerTravis Rhoden <trhoden@redhat.com>
Wed, 5 Aug 2015 16:22:28 +0000 (09:22 -0700)
Only install plugin if using Yum for repo_install and mirror_install.

This is needed because Fedora re-uses these methods

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
ceph_deploy/hosts/centos/install.py

index 8dab18afd08024f33f0a06c73a287cc8ce7b7a14..f24bec08adccb6258f7bcc94b6063c33230dd7c3 100644 (file)
@@ -54,7 +54,7 @@ def install(distro, version_kind, version, adjust_repos, **kw):
     # Get EPEL installed before we continue:
     if adjust_repos:
         distro.packager.install('epel-release')
-        distro.packager.install_priorities_plugin()
+        distro.packager.install('yum-plugin-priorities')
         distro.conn.remote_module.enable_yum_priority_obsoletes()
         logger.warning('check_obsoletes has been enabled for Yum priorities plugin')
     if version_kind in ['stable', 'testing']:
@@ -141,9 +141,10 @@ def mirror_install(distro, repo_url, gpg_url, adjust_repos, extra_installs=True,
 
         distro.conn.remote_module.write_yum_repo(ceph_repo_content)
         # set the right priority
-        distro.packager.install_priorities_plugin()
+        if distro.packager.name == 'yum':
+            distro.packager.install('yum-plugin-priorities')
         distro.conn.remote_module.set_repo_priority(['Ceph', 'Ceph-noarch', 'ceph-source'])
-        distro.conn.logger.warning('alter.d ceph.repo priorities to contain: priority=1')
+        distro.conn.logger.warning('altered ceph.repo priorities to contain: priority=1')
 
 
     if extra_installs and packages:
@@ -198,11 +199,8 @@ def repo_install(distro, reponame, baseurl, gpgkey, **kw):
 
     # set the right priority
     if kw.get('priority'):
-        distro.packager.install_priorities_plugin()
-        logger.warning(
-            'ensuring that {repo_path} contains a high priority'.format(
-                repo_path=repo_path)
-        )
+        if distro.packager.name == 'yum':
+            distro.packager.install('yum-plugin-priorities')
 
         distro.conn.remote_module.set_repo_priority([reponame], repo_path)
         logger.warning('altered {reponame}.repo priorities to contain: priority=1'.format(