From nobody Mon Feb 9 16:13:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1581355135878350.1254858131849; Mon, 10 Feb 2020 09:18:55 -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-58-16kzQ360N7mDhVB1uC_dYA-1; Mon, 10 Feb 2020 12:18:49 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6F6E1800D54; Mon, 10 Feb 2020 17:18:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45C9D5DA82; Mon, 10 Feb 2020 17:18:44 +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 EF06C866C1; Mon, 10 Feb 2020 17:18:43 +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 01AHIPFG028020 for ; Mon, 10 Feb 2020 12:18:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6152D5C28F; Mon, 10 Feb 2020 17:18:25 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE1AF5C1D6 for ; Mon, 10 Feb 2020 17:18:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581355134; 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=0PU70jcP7kwhbnwuwoaDup8NjPaJypb0Tt9E3Qu0Bzs=; b=DrllrOfgJQsKqDVIU5/+HffuC1oMAaAIeczZAiiZzIj1EXaLwaGOvujKqjpCCFencSbflC NDWY+ZZSitwD7wvZjCikqOnwoZGb3EQiMjOqkBl+FkY7d9g2b2dCTx9sY/GVv7ixdNzwP0 pkHRMxP8WjdqQmMS7lodqnUl+KpRk5U= From: Andrea Bolognani To: libvir-list@redhat.com Subject: [jenkins-ci PATCH 3/8] lcitool: Separate computation and formatting Date: Mon, 10 Feb 2020 18:18:12 +0100 Message-Id: <20200210171817.53126-4-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.14 X-MC-Unique: 16kzQ360N7mDhVB1uC_dYA-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 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index 80a0d6a..6da2206 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -720,8 +720,6 @@ class Application: pkg_align =3D " \\\n" + (" " * len("RUN " + package_manager + " ")) pip_pkg_align =3D " \\\n" + (" " * len("RUN pip3 ")) =20 - print("FROM {}".format(facts["docker_base"])) - varmap =3D {} varmap["package_manager"] =3D package_manager varmap["pkgs"] =3D pkg_align[1:] + pkg_align.join(sorted(set(pkgs.= values()))) @@ -729,19 +727,21 @@ class Application: if pip_pkgs: varmap["pip_pkgs"] =3D pip_pkg_align[1:] + pip_pkg_align.join(= sorted(set(pip_pkgs.values()))) =20 - if package_format =3D=3D "deb": - 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()] - pkg_names.append(gcc) - varmap["cross_pkgs"] =3D pkg_align[1:] + pkg_align.join(so= rted(set(pkg_names))) - varmap["cross_abi"] =3D abi - varmap["cross_lib"] =3D lib + if package_format =3D=3D "deb" and 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) + gcc =3D "gcc-" + abi + varmap["cross_arch"] =3D deb_arch + pkg_names =3D [p + ":" + deb_arch for p in cross_pkgs.values()] + pkg_names.append(gcc) + varmap["cross_pkgs"] =3D pkg_align[1:] + pkg_align.join(sorted= (set(pkg_names))) + varmap["cross_abi"] =3D abi + varmap["cross_lib"] =3D lib =20 + print("FROM {}".format(facts["docker_base"])) + + if package_format =3D=3D "deb": sys.stdout.write(textwrap.dedent(""" RUN export DEBIAN_FRONTEND=3Dnoninteractive && \\ {package_manager} update && \\ --=20 2.24.1