On Wednesday, August 21, 2019 at 11:19:22 PM UTC+5:30, Jan Kiszka wrote: > > On 21.08.19 19:43, vijaikumar...@gmail.com wrote: > > From: Vijai Kumar K > > > > > If the setup script is run multiple times in the same shell session, > > PATH variable gets overpopulated with duplicate entries. Remove any > > existing entries before adding. > > > > Signed-off-by: Vijai Kumar K > > > --- > > scripts/isar-buildenv-internal | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/scripts/isar-buildenv-internal > b/scripts/isar-buildenv-internal > > index 2186e40..8b941a2 100755 > > --- a/scripts/isar-buildenv-internal > > +++ b/scripts/isar-buildenv-internal > > @@ -60,7 +60,14 @@ unset BDIR > > > > export BUILDDIR > > > > -PATH=$ISARROOT/bitbake/bin:$ISARROOT/scripts:$PATH > > +for newpath in "$ISARROOT/bitbake/bin" "$ISARROOT/scripts"; do > > + # Remove any existences of $newpath from $PATH > > + PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##") > > + > > + # Add $newpath to $PATH > > + PATH="$newpath:$PATH" > > +done > > + > > export PATH > > > > BBPATH="${BUILDDIR}" > > > > That's taken from OE - makes sense. OE does "unset newpath" afterwards. > Yes. Right from OE. Ah, it does. Will add in v2. > > Is there more relevant stuff that we may lack? For now, this is it. Just came across this issue. Found out that oe has handled it, so brought in the same. > > Jan > > -- > Siemens AG, Corporate Technology, CT RDA IOT SES-DE > Corporate Competence Center Embedded Linux >