From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6741467829768290304 Date: Mon, 23 Dec 2019 21:21:44 -0800 (PST) From: vijai kumar To: isar-users Message-Id: In-Reply-To: <20191217122400.3aan3h7c6dct3jq7@yssyq.m.ilbers.de> References: <20190927213804.31651-1-Vijaikumar_Kangarajan@mentor.com> <20190927214352.32114-1-Vijaikumar_Kangarajan@mentor.com> <20190930064655.GA10223@lightning> <556d1edf-1533-4c30-b104-58e7f8235325@googlegroups.com> <20191217122400.3aan3h7c6dct3jq7@yssyq.m.ilbers.de> Subject: Re: [PATCH v2] isar-init-build-env: Always set ISARROOT MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1125_1196972118.1577164904905" X-Google-Token: EOjAhvAFuwPz5CCg20k0 X-Google-IP: 139.181.36.34 X-TUID: L0ZcdTLcxalo ------=_Part_1125_1196972118.1577164904905 Content-Type: multipart/alternative; boundary="----=_Part_1126_1029700447.1577164904905" ------=_Part_1126_1029700447.1577164904905 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Tuesday, December 17, 2019 at 5:54:03 PM UTC+5:30, Baurzhan Ismagulov wrote: > > On Wed, Dec 11, 2019 at 02:14:03AM -0800, vijai kumar wrote: > > Ok. On a recent thought, Things would go wrong only when someone moves > the > > isar-init-build-env and writes > > a wrapper script in the same location. In that case, one would need to > pass > > in the ISARROOT from the caller to isar-init-build-env. > > A pattern I see in Yocto downstream projects is the project directory > containing poky as subdirectory. The project wrapper script calls the poky > one > from the subdirectory. I think the problem is that there is no reliable > way to > determine ISARROOT under different shells, e.g.: > > cd /home/ibr/myprj > . myprj-init > . isar/isar-init-build-env > > The desired value is /home/ibr/myprj/isar. This works with shell > extensions > under bash and zsh, but not with dash, thus the ugly > THIS_SCRIPT="$(pwd)/isar-init-build-env" (which also doesn't work for the > scenario above). Dash is the default in Debian to speed up the boot > process. > > Ah, I see. > > The issue we have in hand is more critical than this one feature, which > > could very well be written in other ways. > > I agree this is an important issue. My suggestion: > > * Keep accepting the preset ISARROOT from the environment. > > * Remove ISARROOT from the wic scripts. > > * Restore unsetting ISARROOT. > > Agreed. I think its better remove ISARROOT references now before it gets used in multiple places. Right now, I think its mostly in wic-img and ci-build. I will keep this in my todo-list pipeline. Thanks, Vijai Kumar K > With kind regards, > Baurzhan. > ------=_Part_1126_1029700447.1577164904905 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Tuesday, December 17, 2019 at 5:54:03 PM UTC+5:= 30, Baurzhan Ismagulov wrote:
O= n Wed, Dec 11, 2019 at 02:14:03AM -0800, vijai kumar wrote:
> Ok. On a recent thought, Things would go wrong only when someone m= oves the=20
> isar-init-build-env and writes
> a wrapper script in the same location. In that case, one would nee= d to pass=20
> in the ISARROOT from the caller to isar-init-build-env.

A pattern I see in Yocto downstream projects is the project directory
containing poky as subdirectory. The project wrapper script calls the p= oky one
from the subdirectory. I think the problem is that there is no reliable= way to
determine ISARROOT under different shells, e.g.:

cd /home/ibr/myprj
. myprj-init
=C2=A0 =C2=A0 . isar/isar-init-build-env

The desired value is /home/ibr/myprj/isar. This works with shell extens= ions
under bash and zsh, but not with dash, thus the ugly
THIS_SCRIPT=3D"$(pwd)/isar-init-build-env" (which also d= oesn't work for the
scenario above). Dash is the default in Debian to speed up the boot pro= cess.

=C2=A0
Ah, I see.


> The issue we have in hand is more critical than this one feature, = which=20
> could very well be written in other ways.

I agree this is an important issue. My suggestion:

* Keep accepting the preset ISARROOT from the environment.

* Remove ISARROOT from the wic scripts.

* Restore unsetting ISARROOT.


Agreed. I think its better remove ISAR= ROOT references now before it gets used in multiple places.
R= ight now, I think its mostly in wic-img and ci-build. I will keep this in m= y todo-list pipeline.

Thanks,
Vijai = Kumar K



With kind regards,
Baurzhan.
------=_Part_1126_1029700447.1577164904905-- ------=_Part_1125_1196972118.1577164904905--