Fixes for modular compose with gather nodeps method
This commit is contained in:
parent
392c8324be
commit
42340df6c6
34
0001-gather-Stop-requiring-comps-file-in-nodeps.patch
Normal file
34
0001-gather-Stop-requiring-comps-file-in-nodeps.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 32ca02efd6f59a271c660027c4576ab8ea09aef7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
|
||||||
|
Date: Thu, 20 Jul 2017 13:11:06 +0200
|
||||||
|
Subject: [PATCH 1/3] gather: Stop requiring comps file in nodeps
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
When there are no groups, we shouldn't try to read comps file (because
|
||||||
|
it may very well not be there).
|
||||||
|
|
||||||
|
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
|
||||||
|
---
|
||||||
|
pungi/phases/gather/methods/method_nodeps.py | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/pungi/phases/gather/methods/method_nodeps.py b/pungi/phases/gather/methods/method_nodeps.py
|
||||||
|
index 2979cd7..4b164be 100644
|
||||||
|
--- a/pungi/phases/gather/methods/method_nodeps.py
|
||||||
|
+++ b/pungi/phases/gather/methods/method_nodeps.py
|
||||||
|
@@ -103,6 +103,10 @@ def expand_groups(compose, arch, groups):
|
||||||
|
|
||||||
|
:returns: A set of tuples (pkg_name, arch)
|
||||||
|
"""
|
||||||
|
+ if not groups:
|
||||||
|
+ # No groups, nothing to do (this also covers case when there is no
|
||||||
|
+ # comps file.
|
||||||
|
+ return set()
|
||||||
|
comps_file = compose.paths.work.comps(arch, create_dir=False)
|
||||||
|
comps = CompsWrapper(comps_file)
|
||||||
|
packages = set()
|
||||||
|
--
|
||||||
|
2.9.4
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 5dd6b1b0e7a49d2fa71a98f653e117400d27c173 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Kaluza <jkaluza@redhat.com>
|
||||||
|
Date: Thu, 20 Jul 2017 13:35:53 +0200
|
||||||
|
Subject: [PATCH 2/3] GatherSourceModule: return rpm_obj instead of the
|
||||||
|
rpm_obj.name
|
||||||
|
|
||||||
|
Merges: https://pagure.io/pungi/pull-request/680
|
||||||
|
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
|
||||||
|
---
|
||||||
|
pungi/phases/gather/sources/source_module.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/pungi/phases/gather/sources/source_module.py b/pungi/phases/gather/sources/source_module.py
|
||||||
|
index 2845ea5..b39814c 100644
|
||||||
|
--- a/pungi/phases/gather/sources/source_module.py
|
||||||
|
+++ b/pungi/phases/gather/sources/source_module.py
|
||||||
|
@@ -65,7 +65,7 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase):
|
||||||
|
if (srpm in mmd.components.rpms.keys() and
|
||||||
|
rpm_obj.name not in mmd.filter.rpms and
|
||||||
|
rpm_obj.nevra in mmd.artifacts.rpms):
|
||||||
|
- packages.add((rpm_obj.name, None))
|
||||||
|
+ packages.add((rpm_obj, None))
|
||||||
|
added_rpms.setdefault(mmd_id, [])
|
||||||
|
added_rpms[mmd_id].append(str(rpm_obj.nevra))
|
||||||
|
|
||||||
|
--
|
||||||
|
2.9.4
|
||||||
|
|
54
0003-gather-Don-t-pull-multiple-debuginfo-packages.patch
Normal file
54
0003-gather-Don-t-pull-multiple-debuginfo-packages.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From 65078ef9cfdc204994fdd4ab7c202b45b9631340 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
|
||||||
|
Date: Thu, 20 Jul 2017 14:54:54 +0200
|
||||||
|
Subject: [PATCH 3/3] gather: Don't pull multiple debuginfo packages
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
When there is a noarch subpackage, all compatible debuginfo would be
|
||||||
|
pulled in, which is not desirable.
|
||||||
|
|
||||||
|
Example: Server.x86_64 needs pkg.x86_64 and pkg-data.noarch. We only
|
||||||
|
want pkg-debuginfo.x86_64, but without this patch even
|
||||||
|
pkg-debuginfo.i686 would get in.
|
||||||
|
|
||||||
|
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
|
||||||
|
---
|
||||||
|
pungi/phases/gather/methods/method_nodeps.py | 12 ++++++++----
|
||||||
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pungi/phases/gather/methods/method_nodeps.py b/pungi/phases/gather/methods/method_nodeps.py
|
||||||
|
index 4b164be..c7dd891 100644
|
||||||
|
--- a/pungi/phases/gather/methods/method_nodeps.py
|
||||||
|
+++ b/pungi/phases/gather/methods/method_nodeps.py
|
||||||
|
@@ -50,9 +50,9 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
|
||||||
|
pkg = global_pkgset[i]
|
||||||
|
if not pkg_is_rpm(pkg):
|
||||||
|
continue
|
||||||
|
+ if pkg.arch not in valid_arches:
|
||||||
|
+ continue
|
||||||
|
for gathered_pkg, pkg_arch in packages:
|
||||||
|
- if pkg.arch not in valid_arches:
|
||||||
|
- continue
|
||||||
|
if (type(gathered_pkg) in [str, unicode]
|
||||||
|
and pkg.name != gathered_pkg):
|
||||||
|
continue
|
||||||
|
@@ -86,8 +86,12 @@ class GatherMethodNodeps(pungi.phases.gather.method.GatherMethodBase):
|
||||||
|
continue
|
||||||
|
if pkg.sourcerpm not in seen_srpms:
|
||||||
|
continue
|
||||||
|
- if not set(compatible_arches[pkg.arch]) & set(seen_srpms[pkg.sourcerpm]):
|
||||||
|
- # this handles stuff like i386 debuginfo in a i686 package
|
||||||
|
+ pkg_arches = set(compatible_arches[pkg.arch]) - set(['noarch'])
|
||||||
|
+ seen_arches = set(seen_srpms[pkg.sourcerpm]) - set(['noarch'])
|
||||||
|
+ if not (pkg_arches & seen_arches):
|
||||||
|
+ # We only want to pull in a debuginfo if we have a binary
|
||||||
|
+ # package for a compatible arch. Noarch packages should not
|
||||||
|
+ # pull debuginfo (they would pull in all architectures).
|
||||||
|
continue
|
||||||
|
result["debuginfo"].append({
|
||||||
|
"path": pkg.file_path,
|
||||||
|
--
|
||||||
|
2.9.4
|
||||||
|
|
11
pungi.spec
11
pungi.spec
@ -1,12 +1,15 @@
|
|||||||
Name: pungi
|
Name: pungi
|
||||||
Version: 4.1.17
|
Version: 4.1.17
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Distribution compose tool
|
Summary: Distribution compose tool
|
||||||
|
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://pagure.io/pungi
|
URL: https://pagure.io/pungi
|
||||||
Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2
|
Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2
|
||||||
|
Patch0: 0001-gather-Stop-requiring-comps-file-in-nodeps.patch
|
||||||
|
Patch1: 0002-GatherSourceModule-return-rpm_obj-instead-of-the-rpm.patch
|
||||||
|
Patch2: 0003-gather-Don-t-pull-multiple-debuginfo-packages.patch
|
||||||
|
|
||||||
BuildRequires: python-nose, python-mock
|
BuildRequires: python-nose, python-mock
|
||||||
BuildRequires: python-devel, python-setuptools, python2-productmd >= 1.3
|
BuildRequires: python-devel, python-setuptools, python2-productmd >= 1.3
|
||||||
@ -84,6 +87,9 @@ notification to Fedora Message Bus.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
@ -129,6 +135,9 @@ cd tests && ./test_compose.sh
|
|||||||
%{_bindir}/%{name}-wait-for-signed-ostree-handler
|
%{_bindir}/%{name}-wait-for-signed-ostree-handler
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 20 2017 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.17-2
|
||||||
|
- Fixes for modular compose with gather nodeps method
|
||||||
|
|
||||||
* Mon Jul 17 2017 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.17-1
|
* Mon Jul 17 2017 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.17-1
|
||||||
- checksum: Checksum each image only once (lsedlar)
|
- checksum: Checksum each image only once (lsedlar)
|
||||||
- checksum: Refactor creating checksum files (lsedlar)
|
- checksum: Refactor creating checksum files (lsedlar)
|
||||||
|
Loading…
Reference in New Issue
Block a user