[aiaiai PATCH v3 10/12] aiaiai: use AI_PATH to specify addition postfix PATH

Keller, Jacob E jacob.e.keller at intel.com
Fri Feb 7 11:59:50 PST 2014

> -----Original Message-----
> From: aiaiai [mailto:aiaiai-bounces at lists.infradead.org] On Behalf Of
> Artem Bityutskiy
> Sent: Friday, February 07, 2014 2:59 AM
> To: The Aiaiai Mailing List
> Subject: Re: [aiaiai PATCH v3 10/12] aiaiai: use AI_PATH to specify
> addition postfix PATH
> On Fri, 2014-02-07 at 12:36 +0200, Artem Bityutskiy wrote:
> > From: Jacob Keller <jacob.e.keller at intel.com>
> >
> > This patch adds the use of $AI_PATH in order to enable adding postfix
> > path information to where programs will be located. This can be useful
> > if you need to enable extra portions of path, or move some things to
> > different search order in your PATH. I use it to add the correct
> > binaries for the smatch program.
> >
> > Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Do I understand the problem this patch solves correctly: want to run one
> of the Aiaiai scripts with PATH which is different to your system PATH.
> But you do not want to change your system PATH.
> For example, you do not want to add smatch to your system path, but
> want
> it to be in PATH of Aiaiai scripts.
> Is this right?
> Why can't you just do
> PATH=/path/to/smatch aiaiai-email-test-patchset
> (or any other aiaiai script) ?
> This will not modify PATH of the caller, but aiaiai and all its children
> will see the modified path.
> Just to demonstrate.
> $ VAR=/home
> $ # Just print VAR from a sub-shell and a sub-sub-shell
> $ sh -c 'echo script: $VAR; dash -c "echo inner script: $VAR"'
> script: /home
> inner script: /home
> $ # Now run the sub-shell with modified VAR
> $ VAR=/smatch:$VAR sh -c 'echo script: $VAR; dash -c "echo inner script:
> $VAR"'
> script: /smatch:/home
> inner script: /smatch:/home
> You can use PATH instead of var.
> Would this work for you? To me it looks better than a special "AI_PATH"
> environment variable.
> --
> Best Regards,
> Artem Bityutskiy

Probably. I am actually not sure what problem this originally solved for me.. I think it has something to do with the systemd scripts.. I don't believe I can do "PATH=value:$PATH" in those, since it doesn't interpret environment files as shell scripts.

I actually think that this issue was solved a different way by fixing the location of all the files I was missing. I would say go ahead and drop this patch, I will see if I can make your idea work.

Again, I am unsure what original problem this solved as it's been so long, and I've been slightly afraid to just try dropping the patch.

> _______________________________________________
> aiaiai mailing list
> aiaiai at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/aiaiai

More information about the aiaiai mailing list