]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
GitbuilderProject: don't mangle rpm versions
authorZack Cerza <zack@redhat.com>
Thu, 8 Sep 2016 14:45:38 +0000 (08:45 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 4 Oct 2016 15:01:20 +0000 (09:01 -0600)
Up until now, given a package like:
"ceph-test-11.0.0-2135.g8403c95.x86_64", we were returning "11.0.0",
which doesn't allow us to properly verify installed package versions.
Start returning the entire string provided by gitbuilder so that we can
ensure we match the value returned by packaging.get_package_version().

For .deb packages, we have always used string like:
"11.0.0-2135-g8403c95-1xenial"

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/packaging.py

index e3230944955d76e9b6c7bf22b63f6b4b71ac0f6a..a12a632280ea31c96c3504b639882c01820b857b 100644 (file)
@@ -717,19 +717,6 @@ class GitbuilderProject(object):
         if not resp.ok:
             raise VersionNotFoundError(url)
         version = resp.text.strip()
-        if self.pkg_type == "rpm" and self.project == "ceph":
-            # TODO: move this parsing into a different function for
-            # easier testing
-            # FIXME: 'version' as retreived from the repo is actually the
-            # RPM version PLUS *part* of the release. Example:
-            # Right now, ceph master is given the following version in the
-            # repo file: v0.67-rc3.164.gd5aa3a9 - whereas in reality the RPM
-            # version is 0.61.7 and the release is 37.g1243c97.el6 (centos6).
-            # Point being, I have to mangle a little here.
-            if version[0] == 'v':
-                version = version[1:]
-            if '-' in version:
-                version = version.split('-')[0]
         log.info("Found version: {0}".format(version))
         return version