Speed up composes with modules

This commit is contained in:
Lubomír Sedlář 2018-03-06 15:09:39 +01:00
parent 11255ee7ab
commit 27f8aada0f
2 changed files with 35 additions and 1 deletions

30
861.patch Normal file
View File

@ -0,0 +1,30 @@
From 6514dc85f31853e261cb009f1f2f0e13e30e651c Mon Sep 17 00:00:00 2001
From: Lubomír Sedlář <lsedlar@redhat.com>
Date: Mar 06 2018 08:56:31 +0000
Subject: pkgset: Correctly detect single tag for variant
We need to check tags for the variant, not for the whole compose. This
results in merge always being done even if there is a single tag. For
f29 tag in Fedora this takes about 2 hours for each variant.
Relates: https://pagure.io/pungi/issue/860
Relates: https://bugzilla.redhat.com/show_bug.cgi?id=1551653
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py
index 7d22290..534a77c 100644
--- a/pungi/phases/pkgset/sources/source_koji.py
+++ b/pungi/phases/pkgset/sources/source_koji.py
@@ -320,7 +320,7 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event_id):
if compose_tag in variant_tags[variant]:
# Optimization for case where we have just single compose
# tag - we do not have to merge in this case...
- if len(compose_tags) == 1:
+ if len(variant_tags[variant]) == 1:
variant.pkgset = pkgset
else:
variant.pkgset.merge(pkgset, None, list(all_arches))

View File

@ -1,6 +1,6 @@
Name: pungi
Version: 4.1.22
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Distribution compose tool
Group: Development/Tools
@ -9,6 +9,7 @@ URL: https://pagure.io/pungi
Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2
Patch0: https://pagure.io/pungi/pull-request/830.patch
Patch1: https://pagure.io/pungi/pull-request/859.patch
Patch2: https://pagure.io/pungi/pull-request/861.patch
BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python2-devel
@ -169,6 +170,9 @@ rm -rf %{buildroot}%{python2_sitelib}/%{name}_utils
%{_bindir}/%{name}-wait-for-signed-ostree-handler
%changelog
* Tue Mar 06 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.22-6
- Speed up compose with modules
* Fri Mar 02 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.22-5
- Remove comps groups from purely modular variants