public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Uladzimir Bely <ubely@ilbers.de>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] sdk: Avoid parsing errors when DISTRO_ARCH is not yet set
Date: Mon, 27 Feb 2023 13:13:27 +0100	[thread overview]
Message-ID: <152e7234-87a8-1243-533c-b4877f5b8724@siemens.com> (raw)
In-Reply-To: <2453456.XAFRqVoOGU@hp>

On 27.02.23 12:53, Uladzimir Bely wrote:
> 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 <jan.kiszka@siemens.com>
>>>
>>> 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: '<code>', lineno: 4, function: <module>
>>>
>>>      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 <jan.kiszka@siemens.com>
>>> ---
>>>
>>> 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.
> 
> 

Ok, thanks for explaining.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


  reply	other threads:[~2023-02-27 12:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 16:28 Jan Kiszka
2023-02-27 10:41 ` Jan Kiszka
2023-02-27 11:53   ` Uladzimir Bely
2023-02-27 12:13     ` Jan Kiszka [this message]
2023-02-28  5:50 ` Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=152e7234-87a8-1243-533c-b4877f5b8724@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=ubely@ilbers.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox