
On 8 April 2018 at 04:16, Simon Glass sjg@chromium.org wrote:
On 8 April 2018 at 19:14, Simon Glass sjg@chromium.org wrote:
From: Lothar Waßmann LW@KARO-electronics.de
When the U-Boot base directory happens to have the same name as the branch that buildman is directed to use via the '-b' option and no output directory is specified with '-o', buildman happily starts removing the whole U-Boot sources eventually only stopped with the error message:
OSError: [Errno 20] Not a directory: '../<branch-name>/boards.cfg
Add a check to avoid this and also deal with the case where '-o' points to the source directory, or any subdirectory of it.
Finally, tidy up the confusing logic for removing the old tree when using -b. This is only done when building a branch.
Signed-off-by: Lothar Waßmann LW@KARO-electronics.de Signed-off-by: Simon Glass sjg@chromium.org
Changes in v3:
- Avoid splitting the error string in CheckOutputDir()
Adding the test tag from v2, which I missed:
Tested-by: Lothar Waßmann LW@KARO-electronics.de
Applied to u-boot-dm and now in mainline.