From d13f6553005cc29839add24572f7cb25a1ca3480 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 25 May 2016 16:42:25 -0500 Subject: [PATCH] pungi-koji: fix up latest symlink creation If release_version does not have a . in it the current logic gives us and empty result. in those cases, such as 23 or Rawhide use the value of release_version as is. Signed-off-by: Dennis Gilmore --- bin/pungi-koji | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/pungi-koji b/bin/pungi-koji index e48257e0..09726aed 100755 --- a/bin/pungi-koji +++ b/bin/pungi-koji @@ -369,7 +369,10 @@ def run_compose(compose): # create a latest symlink compose_dir = os.path.basename(compose.topdir) - symlink_name = "latest-%s-%s" % (compose.conf["release_short"], ".".join(compose.conf["release_version"].split(".")[:-1])) + if len(compose.conf["release_version"].split(".")) == 1: + symlink_name = "latest-%s-%s" % (compose.conf["release_short"], compose.conf["release_version"]) + else: + symlink_name = "latest-%s-%s" % (compose.conf["release_short"], ".".join(compose.conf["release_version"].split(".")[:-1])) if compose.conf["release_is_layered"]: symlink_name += "-%s-%s" % (compose.conf["base_product_short"], compose.conf["base_product_version"]) symlink = os.path.join(compose.topdir, "..", symlink_name)