From 32bb9aeabe8d3f020599b51ca6aecafd36c0e4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 30 Oct 2018 09:34:55 +0100 Subject: [PATCH] Load supported milestones from productmd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 1.18 productmd will make the list available for consumers. If possible, we should use it, and fall back to hardcoded list. JIRA: COMPOSE-3044 Signed-off-by: Lubomír Sedlář --- pungi/compose.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pungi/compose.py b/pungi/compose.py index 426a8879..07dd79ee 100644 --- a/pungi/compose.py +++ b/pungi/compose.py @@ -38,7 +38,12 @@ from pungi.wrappers.scm import get_file_from_scm from pungi.util import makedirs, get_arch_variant_data, get_format_substs from pungi.metadata import compose_to_composeinfo -SUPPORTED_MILESTONES = ["RC", "Update"] +try: + # This is available since productmd >= 1.18 + # TODO: remove this once the version is distributed widely enough + from productmd.composeinfo import SUPPORTED_MILESTONES +except ImportError: + SUPPORTED_MILESTONES = ["RC", "Update", "SecurityFix"] def get_compose_dir(topdir, conf, compose_type="production", compose_date=None, compose_respin=None, compose_label=None, already_exists_callbacks=None):