From nobody Mon Feb 9 16:02:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1578412257; cv=none; d=zohomail.com; s=zohoarc; b=SVrhMoEKm5y1abZpnnZ+xLA3AwyQFCbrBRlgzPa2iciIeeEo5hLBfK7DbGBkPNu3HV/Jzln+MQLgiNDzMH4gkkvSZf5Zyeh2UKQcpG1CPB6lDodyQmeeoN2jn/4bPERjEzUBMtcCv7QwivHS9GZJVxdmlyRgs/J92HSrjR9Ttwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578412257; 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=85bMhuGWn3dNycDRLdO18Z0wHDPmjPjvMDrNO8AX4qU=; b=GGH3OtxrB9PmSBAH+5F1JD1H4sNHXzSMQXt9IV8ARg/4jeKODEqXAaNBbB3rctRXkATLH4YpZqoGrNaIEuWf4LKdEAqs96HZvTgnb5N4iu/5+TqKJ1/tYrkc6TuDWsj26+BdhPP6k8Oc6DdFJDfAm5+E7JoxvY1dWadz5MLL8vw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1578412257455299.46499379522504; Tue, 7 Jan 2020 07:50:57 -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-107-WLgNQm68NVCTlHisbsUqOQ-1; Tue, 07 Jan 2020 10:50:54 -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 8C20E803A57; Tue, 7 Jan 2020 15:50:46 +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 67C135D9CA; Tue, 7 Jan 2020 15:50:46 +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 2CEE618089D6; Tue, 7 Jan 2020 15:50:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 007FoSoq005763 for ; Tue, 7 Jan 2020 10:50:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 76D185D9E1; Tue, 7 Jan 2020 15:50:28 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F3CF45D9CA for ; Tue, 7 Jan 2020 15:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578412256; 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=85bMhuGWn3dNycDRLdO18Z0wHDPmjPjvMDrNO8AX4qU=; b=QPC+xaH4oTRqVf7Q0tIWY3BnLzE1pdsFtjPoznnq8jCAnkI8XZ3DLXBrN5HCq4gb7FZSYs /tHs/UBplW+91dm7XGvLjL4MadVLGYzN+OndHhyFVfpNouKdqV7MXmjJJJDgW8LOT5HE3v oTKclCzqpXJO5TLiwB0vAYJLkFOZqOM= From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 7 Jan 2020 16:50:19 +0100 Message-Id: <20200107155020.22439-3-abologna@redhat.com> In-Reply-To: <20200107155020.22439-1-abologna@redhat.com> References: <20200107155020.22439-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [jenkins-ci PATCH 2/3] lcitool: Fix flattening of pip mappings 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: WLgNQm68NVCTlHisbsUqOQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Right now we're looping in the wrong place: instead of unconditionally adding to the flattened list of pip packages and then calling pip multiple times with that same list, we should conditionally add items to the flattened list and then call pip a single time with the result. Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- guests/playbooks/update/tasks/packages.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/guests/playbooks/update/tasks/packages.yml b/guests/playbooks/= update/tasks/packages.yml index 116c46d..fc8a3d1 100644 --- a/guests/playbooks/update/tasks/packages.yml +++ b/guests/playbooks/update/tasks/packages.yml @@ -121,6 +121,15 @@ when: - pip_mappings[item]["default"] is defined =20 +- name: '{{ project }}: Remove unwanted pip mappings' + set_fact: + pip_resolved: '{{ pip_resolved|combine({ item: None }) }}' + with_items: + '{{ packages }}' + when: + - resolved[item] is defined + - resolved[item] !=3D None + - set_fact: pip_flattened: [] =20 @@ -138,10 +147,3 @@ name: '{{ pip_flattened|sort }}' executable: pip3 state: '{{ state }}' - with_items: - '{{ packages }}' - when: - - resolved[item] is defined - - resolved[item] =3D=3D None - - pip_resolved[item] is defined - - pip_resolved[item] !=3D None --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list