buildinstall: Pick correct config with rootfs size
This commit is contained in:
parent
2c4850be7a
commit
e866a03762
59
0001-buildinstall-Pick-correct-config-with-rootfs_size.patch
Normal file
59
0001-buildinstall-Pick-correct-config-with-rootfs_size.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
From 8065239e0416b04c1ef0e1b49de530b8fc829c4d Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
|
||||||
|
Date: Fri, 1 Feb 2019 14:24:20 +0100
|
||||||
|
Subject: [PATCH] buildinstall: Pick correct config with rootfs_size
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
If there are multiple matching configuration blocks, we should take the
|
||||||
|
value that is defined in the last one, but only if it actually is there.
|
||||||
|
That's how it works for other options.
|
||||||
|
|
||||||
|
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
|
||||||
|
---
|
||||||
|
pungi/phases/buildinstall.py | 3 ++-
|
||||||
|
tests/test_buildinstall.py | 2 ++
|
||||||
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/pungi/phases/buildinstall.py b/pungi/phases/buildinstall.py
|
||||||
|
index 04081def..cb44a31c 100644
|
||||||
|
--- a/pungi/phases/buildinstall.py
|
||||||
|
+++ b/pungi/phases/buildinstall.py
|
||||||
|
@@ -77,11 +77,12 @@ class BuildinstallPhase(PhaseBase):
|
||||||
|
bugurl = data.get('bugurl')
|
||||||
|
if not data.get('nomacboot', True):
|
||||||
|
nomacboot = False
|
||||||
|
+ if "rootfs_size" in data:
|
||||||
|
+ rootfs_size = data.get("rootfs_size")
|
||||||
|
add_template.extend(data.get('add_template', []))
|
||||||
|
add_arch_template.extend(data.get('add_arch_template', []))
|
||||||
|
add_template_var.extend(data.get('add_template_var', []))
|
||||||
|
add_arch_template_var.extend(data.get('add_arch_template_var', []))
|
||||||
|
- rootfs_size = data.get("rootfs_size")
|
||||||
|
output_dir = os.path.join(output_dir, variant.uid)
|
||||||
|
output_topdir = output_dir
|
||||||
|
|
||||||
|
diff --git a/tests/test_buildinstall.py b/tests/test_buildinstall.py
|
||||||
|
index 46ee981d..f8f2c27c 100644
|
||||||
|
--- a/tests/test_buildinstall.py
|
||||||
|
+++ b/tests/test_buildinstall.py
|
||||||
|
@@ -251,6 +251,7 @@ class TestBuildinstallPhase(PungiTestCase):
|
||||||
|
'release_is_layered': False,
|
||||||
|
'buildinstall_method': 'lorax',
|
||||||
|
'lorax_options': [
|
||||||
|
+ ('^.*$', {'*': {}}),
|
||||||
|
('^Server$', {
|
||||||
|
'x86_64': {
|
||||||
|
'bugurl': 'http://example.com',
|
||||||
|
@@ -265,6 +266,7 @@ class TestBuildinstallPhase(PungiTestCase):
|
||||||
|
('^Client$', {
|
||||||
|
'*': {'nomacboot': False}
|
||||||
|
}),
|
||||||
|
+ ('^.*$', {'*': {}}),
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: pungi
|
Name: pungi
|
||||||
Version: 4.1.32
|
Version: 4.1.32
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Distribution compose tool
|
Summary: Distribution compose tool
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -11,6 +11,7 @@ Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2
|
|||||||
Patch0: 0001-Make-sure-basearch-is-also-replaced-with-config-ostr.patch
|
Patch0: 0001-Make-sure-basearch-is-also-replaced-with-config-ostr.patch
|
||||||
Patch1: 0001-Only-require-enum34-on-Legacy-Python.patch
|
Patch1: 0001-Only-require-enum34-on-Legacy-Python.patch
|
||||||
Patch2: 0001-ostree_installer-Pass-buildarch-to-lorax.patch
|
Patch2: 0001-ostree_installer-Pass-buildarch-to-lorax.patch
|
||||||
|
Patch3: 0001-buildinstall-Pick-correct-config-with-rootfs_size.patch
|
||||||
|
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-nose
|
||||||
BuildRequires: python3-mock
|
BuildRequires: python3-mock
|
||||||
@ -197,6 +198,9 @@ nosetests-3 --exe
|
|||||||
%{_bindir}/%{name}-wait-for-signed-ostree-handler
|
%{_bindir}/%{name}-wait-for-signed-ostree-handler
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 01 2019 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.32-6
|
||||||
|
- buildinstall: Pick correct config with rootfs size
|
||||||
|
|
||||||
* Mon Jan 28 2019 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.32-5
|
* Mon Jan 28 2019 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.32-5
|
||||||
- Pass buildarch to lorax for ostree installer
|
- Pass buildarch to lorax for ostree installer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user