From fbb7f751a8afa491fa792284fee901c76b60fda9 Mon Sep 17 00:00:00 2001 From: Jeffrey Townsend Date: Thu, 3 May 2018 19:09:40 +0000 Subject: [PATCH] Handle directory creation collisions hit during parallel builds. --- tools/onlpm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/onlpm.py b/tools/onlpm.py index 6faa6e2c..3d89e6d9 100755 --- a/tools/onlpm.py +++ b/tools/onlpm.py @@ -301,8 +301,11 @@ class OnlPackage(object): # if dst.endswith('/'): dstpath = os.path.join(root, dst) - if not os.path.exists(dstpath): + try: os.makedirs(dstpath) + except OSError, e: + if e.errno != os.errno.EEXIST: + raise shutil.copy(src, dstpath) else: dstpath = os.path.join(root, os.path.dirname(dst))