Skip to contentSkip to conversation

buildman: Fix problem with non-existent output directories

PATCH New Tom Rini 2 participants 6 messages Nov 1, 2019 – Nov 24, 2019

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 buildman: Fix problem with non-existent output directories

Now that we have buildman telling genboards.cfg to use an output directory we need to ensure that it exists.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Fixes bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg")
---
 tools/buildman/control.py | 2 ++
 1 file changed, 2 insertions(+)
tools/buildman/control.py +2 -0
index 9787b8674761..5988ada72b75 100644
@@ -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])
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 buildman: Fix problem with non-existent output directories

Quoted 17 lines · Tom Rini

Now that we have buildman telling genboards.cfg to use an output directory we need to ensure that it exists.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Fixes bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg")
---
 tools/buildman/control.py | 2 ++
 1 file changed, 2 insertions(+)
tools/buildman/control.py +0 -0
index 9787b8674761..5988ada72b75 100644

tools/buildman/control.py def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, · line 205

Quoted 5 lines
tools/buildman/control.py +2 -0
@@ -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() ?

tools/buildman/control.py def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,

Quoted 4 lines
tools/buildman/control.py +0 -1
         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

author
#2 lore raw

PATCH 1/1 buildman: Fix problem with non-existent output directories

Quoted 19 lines · Bin Meng
Quoted 18 lines · Tom Rini

Now that we have buildman telling genboards.cfg to use an output directory we need to ensure that it exists.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Fixes bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg")
---
 tools/buildman/control.py | 2 ++
 1 file changed, 2 insertions(+)
tools/buildman/control.py +0 -0
index 9787b8674761..5988ada72b75 100644
@@ -201,6 +201,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
 
Quoted 6 lines

tools/buildman/control.py def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, · line 205

Quoted 4 lines
tools/buildman/control.py +2 -0
     # 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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191102/a66f6574/attachment.sig>
author
#3 lore raw

PATCH v2 1/1 buildman: Fix problem with non-existent output directories

In reply to Bin Meng

Now that we have buildman telling genboards.cfg to use an output directory we need to ensure that it exists.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Fixes bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg")

---
Changes in v2:
- Use os.makedirs() per Bin

---
 tools/buildman/control.py | 2 ++
 1 file changed, 2 insertions(+)
tools/buildman/control.py +2 -0
index 216012d00168..c55a65d0c30b 100644
@@ -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.makedirs(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])
Signature · 1 line
2.17.1
#4 lore raw

PATCH v2 1/1 buildman: Fix problem with non-existent output directories

Quoted 8 lines · Tom Rini

Now that we have buildman telling genboards.cfg to use an output directory we need to ensure that it exists.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Fixes bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg")
Quoted 7 lines

---
Changes in v2:
- Use os.makedirs() per Bin

---
 tools/buildman/control.py | 2 ++
 1 file changed, 2 insertions(+)
author
#5 lore raw

PATCH v2 1/1 buildman: Fix problem with non-existent output directories

In reply to Tom Rini
Quoted 8 lines · Tom Rini

Now that we have buildman telling genboards.cfg to use an output directory we need to ensure that it exists.

Cc Bin Meng <[email protected]>
Cc Simon Glass <[email protected]>
Fixes bc750bca1246 ("tools: buildman: Honor output directory when generating boards.cfg")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191124/eb72a80b/attachment.sig>