60 lines
2.3 KiB
Diff
60 lines
2.3 KiB
Diff
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
|
|
|