[master/f21-branch][PATCHv3] split on _ not - when deriving $releasever from productVersion

Adam Williamson awilliam at redhat.com
Wed Sep 10 22:48:52 UTC 2014


>From Fedora 21 Alpha TC6 on, the version defined in the
buildstamp and treeinfo files (which are supplied by release
engineering) use _ not - to split release version, milestone
and compose (e.g.21_Alpha_TC6, not 20-Alpha-TC6 as it was
previously).
---
 pyanaconda/packaging/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 18d6297..7c7d6e4 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -391,7 +391,7 @@ class Payload(object):
 
     def _getReleaseVersion(self, url):
         """ Return the release version of the tree at the specified URL. """
-        version = productVersion.split("-")[0]
+        version = productVersion.split("_")[0]
 
         log.debug("getting release version from tree at %s (%s)", url, version)
 
@@ -405,7 +405,7 @@ class Payload(object):
             c.read(treeinfo)
             try:
                 # Trim off any -Alpha or -Beta
-                version = c.get("general", "version").split("-")[0]
+                version = c.get("general", "version").split("_")[0]
             except ConfigParser.Error:
                 pass
 
-- 
2.1.0



More information about the anaconda-patches mailing list