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
This commit is contained in:
stepan_oksanichenko 2021-06-18 14:23:42 +03:00
parent 084321dd97
commit 14dd6a195f

View File

@ -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: