From nobody Mon Feb 9 10:28:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1581355144631828.5638082432762; Mon, 10 Feb 2020 09:19:04 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416--mR0CgmvPeCjYmRaZmzYyQ-1; Mon, 10 Feb 2020 12:18:34 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8D50C800D41; Mon, 10 Feb 2020 17:18:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1F5EB60BF3; Mon, 10 Feb 2020 17:18:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E921B18089CE; Mon, 10 Feb 2020 17:18:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01AHINJD028000 for ; Mon, 10 Feb 2020 12:18:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id BF1735C21B; Mon, 10 Feb 2020 17:18:23 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 478C15C1D6 for ; Mon, 10 Feb 2020 17:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581355143; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=di2wZyPz0Qsd0aD+inmSRjmP6rBdSulPIR0vkohdD8I=; b=RtDsyYnJZQOeWoRcbwA5RkuEohWt095sHj/ziKRmNBP+t9x2mKQ5t43ZWrO1Cgn7YeJOnt Ze/koA26gKKTg85C2nTlLa+0IyttlhHKQrq+tzTwU2q8NDDiQ9BfBrnFJdYWd2O7QE/68p UmY185uFaxvv36/zqS6qT3PpUm0piLQ= From: Andrea Bolognani To: libvir-list@redhat.com Subject: [jenkins-ci PATCH 1/8] lcitool: Introduce cross_arch local variable Date: Mon, 10 Feb 2020 18:18:10 +0100 Message-Id: <20200210171817.53126-2-abologna@redhat.com> In-Reply-To: <20200210171817.53126-1-abologna@redhat.com> References: <20200210171817.53126-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: -mR0CgmvPeCjYmRaZmzYyQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani --- guests/lcitool | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 8a681e4..6624887 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -657,15 +657,16 @@ class Application: os_name =3D facts["os_name"] os_version =3D facts["os_version"] os_full =3D os_name + os_version + cross_arch =3D args.cross_arch =20 if package_format not in ["deb", "rpm"]: raise Exception("Host {} doesn't support Dockerfiles".format(h= ost)) - if args.cross_arch: + if cross_arch: if os_name !=3D "Debian": raise Exception("Cannot cross compile on {}".format(os_nam= e)) - if args.cross_arch =3D=3D self._native_arch: + if cross_arch =3D=3D self._native_arch: raise Exception("Cross arch {} should differ from native {= }". - format(args.cross_arch, self._native_arch)) + format(cross_arch, self._native_arch)) =20 projects =3D self._projects.expand_pattern(args.projects) for project in projects: @@ -682,8 +683,8 @@ class Application: pip_pkgs =3D {} base_keys =3D ["default", package_format, os_name, os_full] cross_keys =3D [] - if args.cross_arch: - keys =3D base_keys + [args.cross_arch + "-" + k for k in base_= keys] + if cross_arch: + keys =3D base_keys + [cross_arch + "-" + k for k in base_keys] cross_keys =3D ["cross-policy-" + k for k in base_keys] else: keys =3D base_keys + [self._native_arch + "-" + k for k in bas= e_keys] @@ -727,10 +728,10 @@ class Application: varmap["pip_pkgs"] =3D pip_pkg_align[1:] + pip_pkg_align.join(sort= ed(set(pip_pkgs.values()))) =20 if package_format =3D=3D "deb": - if args.cross_arch: - deb_arch =3D Util.native_arch_to_deb_arch(args.cross_arch) - abi =3D Util.native_arch_to_abi(args.cross_arch) - lib =3D Util.native_arch_to_lib(args.cross_arch) + if cross_arch: + deb_arch =3D Util.native_arch_to_deb_arch(cross_arch) + abi =3D Util.native_arch_to_abi(cross_arch) + lib =3D Util.native_arch_to_lib(cross_arch) gcc =3D "gcc-" + abi varmap["cross_arch"] =3D deb_arch pkg_names =3D [p + ":" + deb_arch for p in cross_pkgs.valu= es()] @@ -749,7 +750,7 @@ class Application: sed -Ei 's,^# (en_US\\.UTF-8 .*)$,\\1,' /etc/locale.ge= n && \\ dpkg-reconfigure locales """).format(**varmap)) - if args.cross_arch: + if cross_arch: # Intentionally a separate RUN command from the above # so that the common packages of all cross-built images # share a Docker image layer. @@ -831,7 +832,7 @@ class Application: ENV LANG "en_US.UTF-8" """).format(**varmap)) =20 - if args.cross_arch: + if cross_arch: sys.stdout.write(textwrap.dedent(""" ENV ABI "{cross_abi}" ENV CONFIGURE_OPTS "--host=3D{cross_abi} \\ --=20 2.24.1