From da1ea83561aed33efe69516983a3dbd1347da0c6 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Jan 28 2019 12:41:49 +0000 Subject: ostree_installer: Pass --buildarch to lorax This should tell lorax what arch to use and avoids fragile detection based on contents of source repo. It uses the same logic buildinstall phase uses to get the buildarch. Related: https://pagure.io/teamsilverblue/issue/67 Signed-off-by: Lubomír Sedlář --- diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py index 587ff2c..081d23d 100644 --- a/pungi/phases/ostree_installer.py +++ b/pungi/phases/ostree_installer.py @@ -9,6 +9,7 @@ from kobo import shortcuts from .base import ConfigGuardedPhase, PhaseLoggerMixin from .. import util +from ..arch import get_valid_arches from ..util import get_volid, get_repo_urls, version_generator, translate_path from ..wrappers import kojiwrapper, iso, lorax, scm @@ -166,6 +167,7 @@ class OstreeInstallerThread(WorkerThread): variant=variant.uid, nomacboot=True, volid=volid, + buildarch=get_valid_arches(arch)[0], buildinstallpackages=config.get('installpkgs'), add_template=self._get_templates(config, 'add_template'), add_arch_template=self._get_templates(config, 'add_arch_template'), diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py index 80e68d4..3ab088d 100644 --- a/tests/test_ostree_installer_phase.py +++ b/tests/test_ostree_installer_phase.py @@ -135,6 +135,7 @@ class OstreeThreadTest(helpers.PungiTestCase): if isfinal: lorax_cmd.append('--isfinal') + lorax_cmd.append("--buildarch=x86_64") lorax_cmd.append('--volid=test-Everything-x86_64') if extra: