pkgset: Only add missing packages from global tag
Background story: if a compose is combining modular and traditional compose, the configuration will contain multiple Koji tags to build package set from (one tag for each module, plus at least one tag for the traditional content). However some packages might be present in multiple tags, and if the package set contains both, there's no way to control which one will end up in the compose. The solution for this is to give preference to the modular compose. If a package with the same name exists in multiple tags, we only take the first one we find. This relies on ordering of collected tags: modular ones are always first, and traditional tags are at the end of the list. If there are multiple modules that contain the same package, only one of them will be used, which is not correct. Allegedly this should not happen. In any case such use case does not work without this patch either, so we're not losing anything. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
f301158974
commit
121ffb403f
2 changed files with 13 additions and 2 deletions
|
|
@ -309,7 +309,8 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event_id):
|
|||
if len(compose_tags) == 1:
|
||||
global_pkgset = pkgset
|
||||
else:
|
||||
global_pkgset.merge(pkgset, None, list(all_arches))
|
||||
global_pkgset.merge(pkgset, None, list(all_arches),
|
||||
unique_name=compose_tag in compose.conf['pkgset_koji_tag'])
|
||||
with open(global_pkgset_path, 'wb') as f:
|
||||
data = pickle.dumps(global_pkgset)
|
||||
f.write(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue