summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2020-06-27 15:41:21 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2020-06-27 15:41:21 (GMT)
commitcfe87cda7ef48c4f55f15c78aaaa041d3a007eef (patch)
tree9b4701cd1292db818db02768b1617c0563299cb6
parent6704539ab5d786b4484fd2fd75274ca8356c357b (diff)
downloadeobuilder-cfe87cda7ef48c4f55f15c78aaaa041d3a007eef.zip
eobuilder-cfe87cda7ef48c4f55f15c78aaaa041d3a007eef.tar.gz
eobuilder-cfe87cda7ef48c4f55f15c78aaaa041d3a007eef.tar.bz2
misc: add a random number to build directory (#44527)v22
-rwxr-xr-xeobuilder-ctl3
1 files changed, 2 insertions, 1 deletions
diff --git a/eobuilder-ctl b/eobuilder-ctl
index 9cfced8..3616b23 100755
--- a/eobuilder-ctl
+++ b/eobuilder-ctl
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import atexit
+import random
import re
import shutil
import subprocess
@@ -115,7 +116,7 @@ def get_project_infos(git_project_path, cmd_options):
error("Unsupported project type", exit_code=2)
results['build_dir'] = os.path.join(
- settings.EOBUILDER_TMP, results['name']
+ settings.EOBUILDER_TMP, '%s-%d' % (results['name'], random.randint(0, 1000000))
)
atexit.register(rm_recursive, results['build_dir'])
results['commit_number'] = output("git rev-parse HEAD")[:-1]