From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7235862407233404928 Date: Fri, 26 May 2023 02:03:51 -0700 (PDT) From: Srinuvasan Arjunan To: isar-users Message-Id: <6563fb6e-0819-4da8-92f5-f03dd7042696n@googlegroups.com> In-Reply-To: References: <20230522044117.1698718-1-srinuvasan_a@mentor.com> <46a03938-0343-4221-a57c-efba80b27c83@siemens.com> <86f59c50-3cd4-4465-b04c-db7c0aa0cee9n@googlegroups.com> Subject: Re: [PATCH] crossvars.bbclass: use d.appendVar instead of d.setVar for SDK_TOOLCHAIN variable MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2644_1010528373.1685091831223" X-TUID: o07v8JfmEi6Q ------=_Part_2644_1010528373.1685091831223 Content-Type: multipart/alternative; boundary="----=_Part_2645_933601265.1685091831223" ------=_Part_2645_933601265.1685091831223 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thursday, May 25, 2023 at 3:50:49=E2=80=AFPM UTC+5:30 Jan Kiszka wrote: On 25.05.23 06:53, Srinuvasan Arjunan wrote:=20 >=20 >=20 > On Monday, May 22, 2023 at 11:24:53=E2=80=AFAM UTC+5:30 Jan Kiszka wrote:= =20 >=20 > On 22.05.23 07:16, 'Jan Kiszka' via isar-users wrote:=20 > > On 22.05.23 06:41, Srinuvasan Arjunan wrote:=20 > >> From: Srinuvasan A =20 > >>=20 > >> In downstream layer we may override the sdk_toolchain, but this=20 > not works as=20 > >> expected in latest ISAR, the reason behind this as they moved=20 > toolchain=20 > >> selection into python Anonymous function.=20 > >=20 > > Dod you want to append or do you want to replac SDK_TOOLCHAIN in=20 > > downstream? In the latter case, we likely rather want to make our=20 > > assignment in isar weak, no?=20 > >=20 > > if not d.getVar('SDK_TOOLCHAIN'):=20 > > ...=20 > >=20 >=20 > Also to answer: Why is SDK_PREINSTALL insufficient for your=20 > customization?=20 >=20 > Jan=20 >=20 > --=20 > Siemens AG, Technology=20 > Competence Center Embedded Linux=20 >=20 > =20 >=20 > yes we can append our toolchain via SDK_PREINSTALL, but i need to=20 > replace with the "crossbuild-essential-${COMPAT_DISTRO_ARCH}" , this one= =20 > comes via SDK_TOOLCHAIN variable, if i append " gcc-multilib=20 > g++-multilib" without removing the crossbuild-essential am facing broken= =20 > package problem.=20 > Logs:=20 >=20 > Broken gcc-multilib:amd64 Conflicts on gcc-10-i686-linux-gnu:amd64 <=20 > none -> 10.2.1-6cross1 @un puN Ib >=20 > | Considering gcc-10-i686-linux-gnu:amd64 1 as a solution to=20 > gcc-multilib:amd64 10001=20 > | Investigating (0) gcc-10-i686-linux-gnu:amd64 < none ->=20 > 10.2.1-6cross1 @un puN Ib >=20 >=20 > Eventually I need to remove crossbuild-essential, but this one will do=20 > via SDK_TOOLCHAIN remove override , but this does not work in the=20 > downstream layer, because always ISAR's python anonymous function wins=20 > and set its value.=20 Ok, then we should actually implement a weak (?=3D) assignment in the=20 Python block, so that you can define your own SDK_TOOLCHAIN in such=20 scenarios.=20 Jan=20 --=20 Siemens AG, Technology=20 Competence Center Embedded Linux we can't do soft assignment inside pyhton anonymous function, it throws=20 syntax error. Suppose if we want any parameter to override that should not be in python= =20 anonymous function, upstream layer should follow this one. we could write an python anonymous function in downstream layer to set the= =20 proper one, but in this case no use to inherit that functionality from upstream (duplication) In ISAR, this commit c8371018 moves the cross selection part into one=20 place, here obviously we are not overriding the chroot=20 (builchroot/sbuildchroot) part, but we may do override for toolchain selection, I hope we can pull out this= =20 toolchain selection from python function and keep it outside, hence this can be override from other layer. Thanks, Srinu.=20 ------=_Part_2645_933601265.1685091831223 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

On Thursday, May 25, 2023 at 3:50:49=E2= =80=AFPM UTC+5:30 Jan Kiszka wrote:
On 25.05.23 06:53, Srinuvasan Arjunan wrote:
>=20
>=20
> On Monday, May 22, 2023 at 11:24:53=E2=80=AFAM UTC+5:30 Jan Kisz= ka wrote:
>=20
> On 22.05.23 07:16, 'Jan Kiszka' via isar-users wrote:
> > On 22.05.23 06:41, Srinuvasan Arjunan wrote:
> >> From: Srinuvasan A <srinuv...@siemens.com>
> >>
> >> In downstream layer we may override the sdk_toolcha= in, but this
> not works as
> >> expected in latest ISAR, the reason behind this as = they moved
> toolchain
> >> selection into python Anonymous function.
> >
> > Dod you want to append or do you want to replac SDK_TOO= LCHAIN in
> > downstream? In the latter case, we likely rather want t= o make our
> > assignment in isar weak, no?
> >
> > if not d.getVar('SDK_TOOLCHAIN'):
> > ...
> >
>=20
> Also to answer: Why is SDK_PREINSTALL insufficient for your
> customization?
>=20
> Jan
>=20
> --=20
> Siemens AG, Technology
> Competence Center Embedded Linux
>=20
> =C2=A0
>=20
> =C2=A0 =C2=A0=C2=A0yes we can append our toolchain via SDK_PREIN= STALL, but i need to
> replace with the "crossbuild-essential-${COMPAT_DISTRO_ARCH}" , = this one
> comes via SDK_TOOLCHAIN variable, if i append " gcc-multilib
> g++-multilib" without removing the crossbuild-essential am facin= g broken
> package problem.
> Logs:
>=20
> =C2=A0Broken gcc-multilib:amd64 Conflicts on gcc-10-i686-linux-g= nu:amd64 <
> none -> 10.2.1-6cross1 @un puN Ib >
> =C2=A0| =C2=A0 Considering gcc-10-i686-linux-gnu:amd64 1 as a so= lution to
> gcc-multilib:amd64 10001
> =C2=A0| Investigating (0) gcc-10-i686-linux-gnu:amd64 < none = ->
> 10.2.1-6cross1 @un puN Ib >
>=20
> Eventually I need to remove crossbuild-essential, but this one w= ill do
> via SDK_TOOLCHAIN remove override , but this does not work in th= e
> downstream layer, because always ISAR's python anonymous functio= n wins
> and set its value.

Ok, then we should actually implement a weak (?=3D) assignment in the
Python block, so that you can define your own SDK_TOOLCHAIN in such
scenarios.

Jan

--=20
Siemens AG, Technology
Competence Center Embedded Linux

=C2=A0we can't do soft assignment inside pyhton anonymous fu= nction, it throws syntax error.

Suppose if we want any parameter= to override that should not be in python anonymous function, upstream laye= r should follow this one.
we could write an python anonymous function = in downstream layer to set the proper one, but in this case no use to inher= it that functionality
from upstream (duplication)
In ISAR, this c= ommit c8371018 moves the cross selection part into one place, here obviousl= y we are not overriding the chroot (builchroot/sbuildchroot) part,
but= we may do override for toolchain selection, I hope we can pull out this to= olchain selection from python function and keep it outside,
hence= this can be override from other layer.

Thanks,<= /div>
Srinu.=C2=A0
------=_Part_2645_933601265.1685091831223-- ------=_Part_2644_1010528373.1685091831223--