[PATCH] split on _ not - when deriving $releasever from productVersion

Anne Mulhern amulhern at redhat.com
Wed Sep 10 22:01:21 UTC 2014





----- Original Message -----
> From: "Adam Williamson" <awilliam at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, September 10, 2014 5:30:39 PM
> Subject: [PATCH] split on _ not - when deriving $releasever from productVersion
> 
> From Fedora 21 Alpha TC6 on, the "Version" string in the
> buildstamp (which is supplied by release engineering) uses _
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/packaging/__init__.py
> b/pyanaconda/packaging/__init__.py
> index 18d6297..4b2bf6f 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)
>  
> --
> 2.1.0
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Maybe better to split on "-" and "_" so that if they change their
minds again it'll still work. Unless they plan to do 21-1_Alpha_TC6
or something like that, of course.

Also, is it certain that they have not also changed the format in the
treeinfo file? If they have, then version needs to be adjusted
in the later block in the same method, as well. If not, probably that
fact should go in the the comment.

- mulhern


More information about the anaconda-patches mailing list