* [PATCH] binman: Handle tool paths containing '~' correctly
@ 2020-11-09 14:45 Simon Glass
2020-11-10 14:44 ` Alper Nebi Yasak
0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2020-11-09 14:45 UTC (permalink / raw)
To: u-boot
At present if CROSS_COMPILE contains a tilde, such as
~/.buildman-toolchains/gcc-7.3.0-nolibc/i386-linux/bin/i386-linux-gcc
then binman gives a confusing error:
binman: Error 255 running '~/..buildman-toolchains/gcc-7.3.0- ...
Fix this by expanding it out before running the tool.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/patman/tools.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index bbb157da873..05b1a1d4b08 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -333,6 +333,7 @@ def Run(name, *args, **kwargs):
elif for_host:
name, extra_args = GetHostCompileTool(name)
args = tuple(extra_args) + args
+ name = os.path.expanduser(name) # Expand paths containing ~
all_args = (name,) + args
result = command.RunPipe([all_args], capture=True, capture_stderr=True,
env=env, raise_on_error=False, binary=binary)
--
2.29.2.222.g5d2a92d10f8-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] binman: Handle tool paths containing '~' correctly
2020-11-09 14:45 [PATCH] binman: Handle tool paths containing '~' correctly Simon Glass
@ 2020-11-10 14:44 ` Alper Nebi Yasak
2020-11-11 1:35 ` Simon Glass
2020-11-30 20:15 ` Simon Glass
0 siblings, 2 replies; 4+ messages in thread
From: Alper Nebi Yasak @ 2020-11-10 14:44 UTC (permalink / raw)
To: u-boot
On 09/11/2020 17:45, Simon Glass wrote:
> At present if CROSS_COMPILE contains a tilde, such as
> ~/.buildman-toolchains/gcc-7.3.0-nolibc/i386-linux/bin/i386-linux-gcc
> then binman gives a confusing error:
>
> binman: Error 255 running '~/..buildman-toolchains/gcc-7.3.0- ...
>
> Fix this by expanding it out before running the tool.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Arguably, whatever is passing CROSS_COMPILE to binman should have
expanded that; how are you passing it? If that's from shell you could
use one of CROSS_COMPILE="$HOME/..." or ~/"..." (the "~/..." form isn't
expanded), if it's read from e.g. ~/.buildman then the config parser
should be expanding it at read-time.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] binman: Handle tool paths containing '~' correctly
2020-11-10 14:44 ` Alper Nebi Yasak
@ 2020-11-11 1:35 ` Simon Glass
2020-11-30 20:15 ` Simon Glass
1 sibling, 0 replies; 4+ messages in thread
From: Simon Glass @ 2020-11-11 1:35 UTC (permalink / raw)
To: u-boot
Hi Alper,
On Tue, 10 Nov 2020 at 07:45, Alper Nebi Yasak <alpernebiyasak@gmail.com> wrote:
>
> On 09/11/2020 17:45, Simon Glass wrote:
> > At present if CROSS_COMPILE contains a tilde, such as
> > ~/.buildman-toolchains/gcc-7.3.0-nolibc/i386-linux/bin/i386-linux-gcc
> > then binman gives a confusing error:
> >
> > binman: Error 255 running '~/..buildman-toolchains/gcc-7.3.0- ...
> >
> > Fix this by expanding it out before running the tool.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Arguably, whatever is passing CROSS_COMPILE to binman should have
> expanded that; how are you passing it? If that's from shell you could
> use one of CROSS_COMPILE="$HOME/..." or ~/"..." (the "~/..." form isn't
> expanded), if it's read from e.g. ~/.buildman then the config parser
> should be expanding it at read-time.
This is actually happening in my lab because tbot is set to use the
home directory for the toolchains. It is set up in the 'lab.py' Python
file and uses ~ to avoid hard-coding it to a particular machine.
Regards,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] binman: Handle tool paths containing '~' correctly
2020-11-10 14:44 ` Alper Nebi Yasak
2020-11-11 1:35 ` Simon Glass
@ 2020-11-30 20:15 ` Simon Glass
1 sibling, 0 replies; 4+ messages in thread
From: Simon Glass @ 2020-11-30 20:15 UTC (permalink / raw)
To: u-boot
Hi Alper,
On Tue, 10 Nov 2020 at 07:45, Alper Nebi Yasak <alpernebiyasak@gmail.com> wrote:
>
> On 09/11/2020 17:45, Simon Glass wrote:
> > At present if CROSS_COMPILE contains a tilde, such as
> > ~/.buildman-toolchains/gcc-7.3.0-nolibc/i386-linux/bin/i386-linux-gcc
> > then binman gives a confusing error:
> >
> > binman: Error 255 running '~/..buildman-toolchains/gcc-7.3.0- ...
> >
> > Fix this by expanding it out before running the tool.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Arguably, whatever is passing CROSS_COMPILE to binman should have
> expanded that; how are you passing it? If that's from shell you could
> use one of CROSS_COMPILE="$HOME/..." or ~/"..." (the "~/..." form isn't
> expanded), if it's read from e.g. ~/.buildman then the config parser
> should be expanding it at read-time.
This is actually happening in my lab because tbot is set to use the
home directory for the toolchains. It is set up in the 'lab.py' Python
file and uses ~ to avoid hard-coding it to a particular machine.
Regards,
Simon
Applied to u-boot-dm, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-30 20:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 14:45 [PATCH] binman: Handle tool paths containing '~' correctly Simon Glass
2020-11-10 14:44 ` Alper Nebi Yasak
2020-11-11 1:35 ` Simon Glass
2020-11-30 20:15 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.