]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
buildpackages: implement get_pkg_type
authorLoic Dachary <ldachary@redhat.com>
Wed, 18 Nov 2015 22:42:41 +0000 (23:42 +0100)
committerLoic Dachary <ldachary@redhat.com>
Wed, 18 Nov 2015 23:37:35 +0000 (00:37 +0100)
It can be deprectated when it is implemented in teuthology.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 13fb23ed69e6b7dfa5c005e81abc6b983c019ba4)

tasks/buildpackages.py

index 52732073e22d8005c3aae211b654d4f70187c870..28c696e70503c018dd131833f10eaf432462f9eb 100644 (file)
@@ -29,6 +29,12 @@ class LocalGitbuilderProject(packaging.GitbuilderProject):
         pass
 
 
+def get_pkg_type(os_type):
+    if os_type in ('centos', 'fedora', 'opensuse', 'rhel', 'sles'):
+        return 'rpm'
+    else:
+        return 'deb'
+
 def apply_overrides(ctx, config):
     if config is None:
         config = {}
@@ -131,7 +137,7 @@ def task(ctx, config):
     arch = ctx.config.get('arch', 'x86_64')
     dist = LocalGitbuilderProject()._get_distro(distro=os_type,
                                                 version=os_version)
-    pkg_type = misc.get_pkg_type(os_type)
+    pkg_type = get_pkg_type(os_type)
     check_call(
         "flock --close /tmp/buildpackages " +
         "make -C " + d + " " + os.environ['HOME'] + "/.ssh_agent",