[PATCH] include variant in the name for .treeinfo when it exists
Vratislav Podzimek
vpodzime at redhat.com
Mon Mar 2 07:43:04 UTC 2015
On Fri, 2015-02-27 at 23:37 -0600, Dennis Gilmore wrote:
> if there is a variant set include that in the name, otherwise
> all the variants end up having the same name set.
>
> Signed-off-by: Dennis Gilmore <dennis at ausil.us>
> ---
> src/pylorax/treeinfo.py | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/pylorax/treeinfo.py b/src/pylorax/treeinfo.py
> index 6f3f620..ac9806c 100644
> --- a/src/pylorax/treeinfo.py
> +++ b/src/pylorax/treeinfo.py
> @@ -33,11 +33,16 @@ class TreeInfo(object):
>
> self.c = ConfigParser.ConfigParser()
>
> + if variant:
> + name = "%s-%s-%s" % (name, variant, version)
> + else:
> + name = "%s-%s" % (name, version)
> +
> section = "general"
> data = {"timestamp": time.time(),
> "family": product,
> "version": version,
> - "name": "%s-%s" % (product, version),
> + "name": name,
> "variant": variant or "",
> "arch": basearch,
> "packagedir": packagedir}
Looks good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list