public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: vijai kumar <vijaikumar.kanagarajan@gmail.com>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] scripts: Avoid adding duplicate entries to PATH
Date: Wed, 21 Aug 2019 11:44:37 -0700 (PDT)	[thread overview]
Message-ID: <e0e70d3c-e77c-480e-a236-0c03b1f00bec@googlegroups.com> (raw)
In-Reply-To: <199abc3d-5887-7011-c4be-b08b909c1a04@siemens.com>


[-- Attachment #1.1: Type: text/plain, Size: 1701 bytes --]



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 <javascript:> wrote: 
> > From: Vijai Kumar K <Vijaikumar_...@mentor.com <javascript:>> 
> > 
> > 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 <Vijaikumar_...@mentor.com <javascript:>> 
> > --- 
> >   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 
>

[-- Attachment #1.2: Type: text/html, Size: 3093 bytes --]

  reply	other threads:[~2019-08-21 18:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 17:43 vijaikumar.kanagarajan
2019-08-21 17:49 ` Jan Kiszka
2019-08-21 18:44   ` vijai kumar [this message]
2019-08-21 18:48   ` [PATCH v2] " vijaikumar.kanagarajan
2019-08-21 19:00     ` Jan Kiszka
2019-09-03  7:56       ` Vijai Kumar K
2019-09-09 13:59     ` Baurzhan Ismagulov

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=e0e70d3c-e77c-480e-a236-0c03b1f00bec@googlegroups.com \
    --to=vijaikumar.kanagarajan@gmail.com \
    --cc=isar-users@googlegroups.com \
    /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