From nobody Mon Feb 9 12:24:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619190457; cv=none; d=zohomail.com; s=zohoarc; b=bebVEmMlvLrPLG5vYB9M34/4aW9awLqPalR+BwRS8Pv6ZWzGGWti80amYcmrQevHXzr3UybhMizP9Zx9vUKBCUmRxyf+XDykL/VS4hDMWYTA/PjohsQi6aQh2xNDFvp5MJXENUHCzEJ5bBz31uFf633UNEC77dZ1oU4mSkQYxkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619190457; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=S9YDa0UhkswHffF88/QxFcJ9lwleK6OFl/S6rcLKkb4=; b=PO5EE+x4n7Ce64WgqnJ4/vZQgmoIhhqjxmmtjuMVbnpL2dAQ37ZgzhV2e5/mc85FmMtL0h4DgXpw9fBlIP6cCCshXmEiARjYVgsTUIKeMLvgaeskGCEqfSUJaeCQD+9FhvCqB+KK9TWg3HopapFkXiC3O1GsWLz14Ml8jTIMyu0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1619190457888244.96114980501272; Fri, 23 Apr 2021 08:07:37 -0700 (PDT) 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-161-sJbanMUUNQ-hTkbfdAkCcA-1; Fri, 23 Apr 2021 11:07:34 -0400 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 8E89A107ACCA; Fri, 23 Apr 2021 15:07:26 +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 6C79960C17; Fri, 23 Apr 2021 15:07:26 +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 CED1844A58; Fri, 23 Apr 2021 15:07:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13NF3PWk031734 for ; Fri, 23 Apr 2021 11:03:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 857C610027C4; Fri, 23 Apr 2021 15:03:25 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9771510027A5 for ; Fri, 23 Apr 2021 15:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619190456; 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=S9YDa0UhkswHffF88/QxFcJ9lwleK6OFl/S6rcLKkb4=; b=MXauO5tMv+TvwuZSi0uzcHyBYxgyzQ9r1GUxVc49dfP4yXLg3wvQkuZiJIY55Jbs26HfzE 4qTTcY6hKMJzVXKcQP9AGk+jgEKTAGYVwuHi9eUtFJt7Qfm13U8uoWvdmfYBAilt8llhsx 1eTQnzDD15QjITIzDTGEY3JBkw7xNvE= X-MC-Unique: sJbanMUUNQ-hTkbfdAkCcA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 07/11] ci: helper: Improve output for list-images action Date: Fri, 23 Apr 2021 17:03:04 +0200 Message-Id: <20210423150308.346189-8-abologna@redhat.com> In-Reply-To: <20210423150308.346189-1-abologna@redhat.com> References: <20210423150308.346189-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" This makes the output more compact by grouping together all images that are built on the same base OS. Later on, when we change the actions that operate on container images to accept an lcitool-style --cross-arch argument instead of expecting the name of the image to have the cross-building architecture baked in, this will allow users to quickly copy-and-paste the necessary information. Signed-off-by: Andrea Bolognani --- ci/helper | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/ci/helper b/ci/helper index c1e1a53d51..6543a47131 100755 --- a/ci/helper +++ b/ci/helper @@ -311,25 +311,12 @@ class Application: self._args.gitlab_uri) images =3D util.get_registry_images(registry_uri) =20 - native =3D [] - cross =3D [] - for image_distro in images.keys(): - if images[image_distro]: - for image_cross in images[image_distro]: - cross.append(image_distro + "-cross-" + image_cross) + for distro in sorted(images.keys()): + if images[distro]: + cross =3D " ".join(sorted(images[distro])) + print(f"{distro} (cross: {cross})") else: - native.append(image_distro) - native.sort() - cross.sort() - - spacing =3D 4 * " " - print("Available x86 container images:\n") - print(spacing + ("\n" + spacing).join(native)) - - if cross: - print() - print("Available cross-compiler container images:\n") - print(spacing + ("\n" + spacing).join(cross)) + print(distro) =20 def _action_refresh(self): self._refresh_containers() --=20 2.26.3