From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7203018052316692480 X-Received: by 2002:a05:6870:1b09:b0:16e:919d:7974 with SMTP id hl9-20020a0568701b0900b0016e919d7974mr2996200oab.5.1677498823121; Mon, 27 Feb 2023 03:53:43 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6870:9d91:b0:16f:d163:2f2e with SMTP id pv17-20020a0568709d9100b0016fd1632f2els3652258oab.11.-pod-prod-gmail; Mon, 27 Feb 2023 03:53:42 -0800 (PST) X-Google-Smtp-Source: AK7set+K4mwUX6PI8jA1ZoJehvP99B5AJTRnUstw1BT2ZgEyXopRLvu/8HGA/oA9yxbSgmZU0b4b X-Received: by 2002:a05:6870:9720:b0:15f:bcf0:86c5 with SMTP id n32-20020a056870972000b0015fbcf086c5mr19873944oaq.56.1677498822359; Mon, 27 Feb 2023 03:53:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677498822; cv=none; d=google.com; s=arc-20160816; b=UwkplGObHh5k2pE4hox48loF9WeKYz9X6SsYs8DhzEMdGa1JUszcFsvrgGpmXJNwSa ck21oREFn3spTWP1G2qvZmVUOI5ZsqOsJ+aVyGWLKpON4AQwwcxY8W+OMEI2cbMzuxc7 WeZ8XZuUyEy8o0rMknfDt/47eVDTFyYMMAnwjcwVkvap0aj5A3hJ8wA12arJ1vsiIHXx CQXe2KF8eORku81PYaQvUSVfR3qSy9C7JpFRSl6JbpC5/Z/ZCIX/Rgsl1WTo92ZYS/8P Jjg4VBdJnCj8fAa/M6wOQr8sENm1IbLH4FXFu8T+DpsIswzplm7EFP3q3xGRRsDy/xUt J7Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=YPVICuNwJnLzFwIgytncOKOkk1FW5T9FDHK+OB3ml8E=; b=uJ3Uy2etXugHLFoKzEJySCyKtBkJzVt3TATVck9Ed1lhRTaVggn8mGSU7X0iad2fl3 +rynxS+pm6v/VtTiy3pweQTRJkhApzzcw9r327U/FUHvlXhiuxcwvRqUcB0tOf35LqIw aOnIukW2kVb/kNvP0sc09YvsruYVDQ8COn34AosGVcZGssTTKFWiEkkBV3am3MYAKaLd XpvpBuMxr4rviMvzl7Eylg+FDOTcrPOrzN/tNeiaX5UhEaurWOVqhmrzpT1OQdkuqQ4n 6piDBe/JSenc/Li99BKnJAkkB2mPR/ixrORTFs7O5wTVpBKMnNLPFiR7UBrxqywBSrJ1 3cjA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id e62-20020a4a5541000000b0051fcdb79effsi376464oob.2.2023.02.27.03.53.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 03:53:42 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from hp.localnet (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 31RBrZP3006798 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Feb 2023 12:53:36 +0100 From: Uladzimir Bely To: isar-users , Jan Kiszka Subject: Re: [PATCH] sdk: Avoid parsing errors when DISTRO_ARCH is not yet set Date: Mon, 27 Feb 2023 14:53:44 +0300 Message-ID: <2453456.XAFRqVoOGU@hp> In-Reply-To: References: <4ac8a0a6-50ac-5a76-88c0-3eef5d2f96a9@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 6WeyY1Y2pJaZ In mail from Monday, 27 February 2023 13:41:37 +03 user Jan Kiszka wrote: > On 22.02.23 17:28, Jan Kiszka wrote: > > From: Jan Kiszka > > > > In multiconfig setups, it can happen during some parsing steps that a > > machine and, thus, a concrete DISTRO_ARCH is not yet set, leading to > > > > The stack trace of python calls that resulted in this exception/failure > > was: File: '', lineno: 4, function: > > > > 0001:__anon_158__build____work_isar_meta_classes_base_bbclass(d) > > 0002:__anon_162__build____work_isar_meta_classes_sstate_bbclass(d) > > 0003:__anon_56__build____work_isar_meta_classes_image_bbclass(d) > > > > *** 0004:__anon_56__build____work_isar_meta_classes_sdk_bbclass(d) > > > > 0005:__anon_21__build____work_isar_meta_classes_buildchroot_bbclass(d > > ) > > 0006:__anon_84__build____work_isar_meta_classes_imagetypes_wic_bbclas > > s(d) > > 0007:__anon_24__build____work_isar_meta_classes_imagetypes_container_ > > bbclass(d) > > 0008:__anon_305__build____work_isar_meta_classes_image_bbclass(d) > > > > File: '/build/../work/isar/meta/classes/sdk.bbclass', lineno: 52, > > function: __anon_56__build____work_isar_meta_classes_sdk_bbclass> > > 0048: distro_arch = d.getVar('DISTRO_ARCH') > > 0049: if mode == "0" or d.getVar('HOST_ARCH') == distro_arch: > > 0050: toolchain = "build-essential" > > > > 0051: else: > > *** 0052: toolchain = "crossbuild-essential-" + distro_arch > > > > 0053: if d.getVar('ISAR_ENABLE_COMPAT_ARCH', True) == "1": > > 0054: toolchain += " crossbuild-essential-" + > > d.getVar('COMPAT_DISTRO_ARCH') 0055: d.setVar('TOOLCHAIN', > > toolchain) > > 0056:} > > > > Exception: TypeError: can only concatenate str (not "NoneType") to str > > > > Signed-off-by: Jan Kiszka > > --- > > > > Found in mtda: https://github.com/siemens/mtda/pull/283 > > > > meta/classes/sdk.bbclass | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass > > index 0a98ea04..01eb3a67 100644 > > --- a/meta/classes/sdk.bbclass > > +++ b/meta/classes/sdk.bbclass > > @@ -46,7 +46,7 @@ SDK_PREINSTALL += " \ > > > > python __anonymous() { > > > > mode = d.getVar('ISAR_CROSS_COMPILE', True) > > distro_arch = d.getVar('DISTRO_ARCH') > > > > - if mode == "0" or d.getVar('HOST_ARCH') == distro_arch: > > > > + if mode == "0" or d.getVar('HOST_ARCH') == distro_arch or distro_arch == None: > > toolchain = "build-essential" > > > > else: > > toolchain = "crossbuild-essential-" + distro_arch > > Hmm, I thought you have fast path for small fixes now? > > Jan Hello. Yes, such an obvious thing might have been merged faster than usually. But it happened to conflict with other patches we were testing at the same time, at least with "[v2,0/4] Fix ccache issues" that seems to absorb your patch. That's why merging was delayed, considering both "fast" and "full" CI still pass OK. I guess, you have the issue in some downstream that doesn't set distro_arch. Anyway, ccache patchset will require new version by some other reasons, so we could merge your patch and consider it in ccache patchset v3.