From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1572480-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 916A61580D3
	for <garchives@archives.gentoo.org>; Thu, 23 Nov 2023 15:02:56 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A2D612BC02D;
	Thu, 23 Nov 2023 15:02:55 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 7EF0F2BC02D
	for <gentoo-commits@lists.gentoo.org>; Thu, 23 Nov 2023 15:02:55 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B9627335DA7
	for <gentoo-commits@lists.gentoo.org>; Thu, 23 Nov 2023 15:02:54 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 88E3313BE
	for <gentoo-commits@lists.gentoo.org>; Thu, 23 Nov 2023 15:02:51 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1700751431.d66f119323ca954a35946b9f3eeeaae0c6c69d0b.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
X-VCS-Repository: repo/gentoo
X-VCS-Files: eclass/multibuild.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: d66f119323ca954a35946b9f3eeeaae0c6c69d0b
X-VCS-Branch: master
Date: Thu, 23 Nov 2023 15:02:51 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 79de5bef-2ee7-4a24-ac86-8a755be5a4ba
X-Archives-Hash: 522e1cdf7cd68b966f860714f5dc3aba

commit:     d66f119323ca954a35946b9f3eeeaae0c6c69d0b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 23 14:55:18 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Nov 23 14:57:11 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d66f1193

multibuild.eclass: Fix passing return value from variants

Move the misplaced return value saving into the variant loop, so that
any non-successful return code is saved (as intended) rather than just
the last one.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/multibuild.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index d8a5862731bf..f15d3327c7dd 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -129,8 +129,8 @@ multibuild_foreach_variant() {
 		_multibuild_run "${@}" \
 			> >(exec tee -a "${T}/build-${MULTIBUILD_ID}.log") 2>&1
 		lret=${?}
+		[[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
 	done
-	[[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
 
 	return ${ret}
 }