]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
packaging: ignore minor version numbers in gitbuilder urls 586/head
authorAndrew Schoen <aschoen@redhat.com>
Tue, 4 Aug 2015 14:24:07 +0000 (09:24 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 4 Aug 2015 14:39:36 +0000 (09:39 -0500)
We don't care about minor version numbers anymore for gitbuilder.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
teuthology/packaging.py
teuthology/test/test_packaging.py

index 38a7899c0b4d2d3fcc501e6fb3cecb2e4ce6824d..4723bd3706512577c8a3299a7edf1b58ddc5293d 100644 (file)
@@ -521,20 +521,9 @@ class GitbuilderProject(object):
         Parses a distro version string and returns a modified string
         that matches the format needed for the gitbuilder url.
 
-        Minor version numbers are ignored if they end in a zero. If they do
-        not end in a zero the minor version number is included with an
-        underscore as the separator instead of a period.
+        Minor version numbers are ignored.
         """
-        version_tokens = version.split(".")
-        include_minor_version = (
-            len(version_tokens) > 1 and
-            version_tokens[1] != "0"
-        )
-        if include_minor_version:
-            return "_".join(version_tokens)
-
-        # return only the major version
-        return version_tokens[0]
+        return version.split(".")[0]
 
     def _get_distro(self, distro=None, version=None, codename=None):
         """
index 65f95987bd6ad6c2ac08616a01cfadda76ca1785..08c42a9220c274dca53b5bb2fa2c22e2f923a28c 100644 (file)
@@ -352,7 +352,9 @@ class TestGitbuilderProject(object):
 
     GITBUILDER_DISTRO_MATRIX = [
         ('rhel', '7.0', None, 'centos7'),
-        ('centos', '6.5', None, 'centos6_5'),
+        ('centos', '6.5', None, 'centos6'),
+        ('centos', '7.0', None, 'centos7'),
+        ('centos', '7.1', None, 'centos7'),
         ('fedora', '20', None, 'fc20'),
         ('ubuntu', '14.04', 'trusty', 'trusty'),
         ('ubuntu', '14.04', None, 'trusty'),