Re: [U-Boot] [PATCH 07/13] buildman: Print a message when removing old directories

2016-10-01 Thread Simon Glass
On 18 September 2016 at 16:48, Simon Glass  wrote:
> When buildman starts, it prepares its output directory by removing any old
> build directories which will not be used this time. This can happen if a
> previous build left directories around for commit hashes which are no-longer
> part of the branch.
>
> This can take quite a while, so print a message to indicate what is going
> on.
>
> Signed-off-by: Simon Glass 
> ---
>
>  tools/buildman/builder.py | 6 ++
>  1 file changed, 6 insertions(+)

Applied to u-boot-dm.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 07/13] buildman: Print a message when removing old directories

2016-09-18 Thread Simon Glass
When buildman starts, it prepares its output directory by removing any old
build directories which will not be used this time. This can happen if a
previous build left directories around for commit hashes which are no-longer
part of the branch.

This can take quite a while, so print a message to indicate what is going
on.

Signed-off-by: Simon Glass 
---

 tools/buildman/builder.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 7c237a5..a80333f 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -1410,8 +1410,14 @@ class Builder:
 for commit_upto in range(self.commit_count):
 dir_list.append(self._GetOutputDir(commit_upto))
 
+to_remove = []
 for dirname in glob.glob(os.path.join(self.base_dir, '*')):
 if dirname not in dir_list:
+to_remove.append(dirname)
+if to_remove:
+Print('Removing %d old build directories' % len(to_remove),
+  newline=False)
+for dirname in to_remove:
 shutil.rmtree(dirname)
 
 def BuildBoards(self, commits, board_selected, keep_outputs, verbose):
-- 
2.8.0.rc3.226.g39d4020

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot