From 14dd6a195f58a38abfd045785a6bb886750ca3ca Mon Sep 17 00:00:00 2001 From: stepan_oksanichenko Date: Fri, 18 Jun 2021 14:23:42 +0300 Subject: [PATCH] LNX-326: Add the ability to include any package by mask in packages.json to the generator - The reference packages should be replaced only by the newer reference packages - The non-reference packages should be replaced by both of types packages @BS-NOBUILD @BS-TARGET-CL8 Change-Id: I881bd4e58527ae219ef6e1adbc6332b3b05933c1 --- pungi/scripts/create_packages_json.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pungi/scripts/create_packages_json.py b/pungi/scripts/create_packages_json.py index 72996c03..74041ca5 100644 --- a/pungi/scripts/create_packages_json.py +++ b/pungi/scripts/create_packages_json.py @@ -295,9 +295,13 @@ class PackagesGenerator: all_packages[package_key]['variant'] = repo_info.name all_packages[package_key]['arch'] = repo_info.arch all_packages[package_key]['package'] = package - elif not repo_info.is_reference: - continue - elif self.compare_pkgs_version( + all_packages[package_key]['type'] = repo_info.is_reference + # replace an older package if it's not reference or + # a newer package is from reference repo + elif (not all_packages[package_key]['type'] or + all_packages[package_key]['type'] == + repo_info.is_reference) and \ + self.compare_pkgs_version( package, all_packages[package_key]['package'] ) > 0: