]> git.baikalelectronics.ru Git - uboot.git/commit
tools: buildman: Don't use the working dir as build dir
authorLothar Waßmann <LW@KARO-electronics.de>
Sun, 8 Apr 2018 11:14:11 +0000 (05:14 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 16 May 2018 06:25:19 +0000 (00:25 -0600)
commit75cfd1f201f6b091c9cbff5ef4f7505fc2d00fb4
treef3fbda45397d5cfeb2740650d85181c705568aad
parent68541d390fead492b3bd4995dc889de16ac49d09
tools: buildman: Don't use the working dir as build dir

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>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
tools/buildman/builderthread.py
tools/buildman/control.py
tools/buildman/func_test.py