Message ID | 20191101214759.19737-1-trini@konsulko.com |
---|---|
State | Changes Requested |
Delegated to: | Bin Meng |
Headers | show |
Series | [U-Boot] buildman: Fix problem with non-existent output directories | expand |
On Sat, Nov 2, 2019 at 5:48 AM Tom Rini <trini@konsulko.com> wrote: > > Now that we have buildman telling genboards.cfg to use an output > directory we need to ensure that it exists. > > Cc: Bin Meng <bmeng.cn@gmail.com> > Cc: Simon Glass <sjg@chromium.org> > Fixes: bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg") > Signed-off-by: Tom Rini <trini@konsulko.com> > --- > tools/buildman/control.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/buildman/control.py b/tools/buildman/control.py > index 9787b8674761..5988ada72b75 100644 > --- a/tools/buildman/control.py > +++ b/tools/buildman/control.py > @@ -201,6 +201,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, > > # Work out what subset of the boards we are building > if not boards: > + if not os.path.exists(options.output_dir): > + os.mkdir(options.output_dir) Use os.makedirs() ? > board_file = os.path.join(options.output_dir, 'boards.cfg') > genboardscfg = os.path.join(options.git, 'tools/genboardscfg.py') > status = subprocess.call([genboardscfg, '-o', board_file]) > -- Regards, Bin
On Sat, Nov 02, 2019 at 11:54:44AM +0800, Bin Meng wrote: > On Sat, Nov 2, 2019 at 5:48 AM Tom Rini <trini@konsulko.com> wrote: > > > > Now that we have buildman telling genboards.cfg to use an output > > directory we need to ensure that it exists. > > > > Cc: Bin Meng <bmeng.cn@gmail.com> > > Cc: Simon Glass <sjg@chromium.org> > > Fixes: bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg") > > Signed-off-by: Tom Rini <trini@konsulko.com> > > --- > > tools/buildman/control.py | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/tools/buildman/control.py b/tools/buildman/control.py > > index 9787b8674761..5988ada72b75 100644 > > --- a/tools/buildman/control.py > > +++ b/tools/buildman/control.py > > @@ -201,6 +201,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, > > > > # Work out what subset of the boards we are building > > if not boards: > > + if not os.path.exists(options.output_dir): > > + os.mkdir(options.output_dir) > > Use os.makedirs() ? Ah, in case we need more than one directory made? OK, I'll do v2 shortly.
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 9787b8674761..5988ada72b75 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -201,6 +201,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, # Work out what subset of the boards we are building if not boards: + if not os.path.exists(options.output_dir): + os.mkdir(options.output_dir) board_file = os.path.join(options.output_dir, 'boards.cfg') genboardscfg = os.path.join(options.git, 'tools/genboardscfg.py') status = subprocess.call([genboardscfg, '-o', board_file])
Now that we have buildman telling genboards.cfg to use an output directory we need to ensure that it exists. Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Simon Glass <sjg@chromium.org> Fixes: bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg") Signed-off-by: Tom Rini <trini@konsulko.com> --- tools/buildman/control.py | 2 ++ 1 file changed, 2 insertions(+)