Update samba-4.9.0rc5-parallel-builds.patch
This commit is contained in:
parent
3736d1c511
commit
e84add587d
@ -1,4 +1,4 @@
|
|||||||
From 45ff96780bad2c1f806b101ca1211f5c3cef1a4d Mon Sep 17 00:00:00 2001
|
From 2f1c716ffef351a56aa5bd0a26c3dd1e34d3283a Mon Sep 17 00:00:00 2001
|
||||||
From: Andreas Schneider <asn@samba.org>
|
From: Andreas Schneider <asn@samba.org>
|
||||||
Date: Thu, 6 Sep 2018 12:40:10 +0200
|
Date: Thu, 6 Sep 2018 12:40:10 +0200
|
||||||
Subject: [PATCH] wafsamba: Deal with make -j<num>
|
Subject: [PATCH] wafsamba: Deal with make -j<num>
|
||||||
@ -9,43 +9,44 @@ no parallel jobs at all.
|
|||||||
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13606
|
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13606
|
||||||
|
|
||||||
Signed-off-by: Andreas Schneider <asn@samba.org>
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
||||||
|
Reviewed-by: Alexander Bokovoy <ab@samba.org>
|
||||||
---
|
---
|
||||||
buildtools/wafsamba/samba_utils.py | 14 ++++++--------
|
buildtools/wafsamba/samba_utils.py | 9 +++++++--
|
||||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
|
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
|
||||||
index 0f95c125854..ad46005519f 100644
|
index 30e99432d1b..fd61b8425d8 100644
|
||||||
--- a/buildtools/wafsamba/samba_utils.py
|
--- a/buildtools/wafsamba/samba_utils.py
|
||||||
+++ b/buildtools/wafsamba/samba_utils.py
|
+++ b/buildtools/wafsamba/samba_utils.py
|
||||||
@@ -466,7 +466,7 @@ def CHECK_MAKEFLAGS(bld):
|
@@ -448,6 +448,7 @@ def CHECK_MAKEFLAGS(bld):
|
||||||
makeflags = os.environ.get('MAKEFLAGS')
|
|
||||||
if makeflags is None:
|
if makeflags is None:
|
||||||
return
|
return
|
||||||
- jobs_set = False
|
jobs_set = False
|
||||||
+ jobs = 1
|
+ jobs = None
|
||||||
# we need to use shlex.split to cope with the escaping of spaces
|
# we need to use shlex.split to cope with the escaping of spaces
|
||||||
# in makeflags
|
# in makeflags
|
||||||
for opt in shlex.split(makeflags):
|
for opt in shlex.split(makeflags):
|
||||||
@@ -489,17 +489,15 @@ def CHECK_MAKEFLAGS(bld):
|
@@ -470,17 +471,21 @@ def CHECK_MAKEFLAGS(bld):
|
||||||
setattr(Options.options, opt[0:loc], opt[loc+1:])
|
setattr(Options.options, opt[0:loc], opt[loc+1:])
|
||||||
elif opt[0] != '-':
|
elif opt[0] != '-':
|
||||||
for v in opt:
|
for v in opt:
|
||||||
- if v == 'j':
|
- if v == 'j':
|
||||||
- jobs_set = True
|
|
||||||
+ if re.search(r'j[0-9]*$', v):
|
+ if re.search(r'j[0-9]*$', v):
|
||||||
+ jobs = int(opt.strip('j'))
|
jobs_set = True
|
||||||
|
+ jobs = opt.strip('j')
|
||||||
elif v == 'k':
|
elif v == 'k':
|
||||||
Options.options.keep = True
|
Options.options.keep = True
|
||||||
- elif opt == '-j':
|
- elif opt == '-j':
|
||||||
- jobs_set = True
|
|
||||||
+ elif re.search(r'-j[0-9]*$', opt):
|
+ elif re.search(r'-j[0-9]*$', opt):
|
||||||
+ jobs = int(opt.strip('-j'))
|
jobs_set = True
|
||||||
|
+ jobs = opt.strip('-j')
|
||||||
elif opt == '-k':
|
elif opt == '-k':
|
||||||
Options.options.keep = True
|
Options.options.keep = True
|
||||||
- if not jobs_set:
|
if not jobs_set:
|
||||||
- # default to one job
|
# default to one job
|
||||||
- Options.options.jobs = 1
|
Options.options.jobs = 1
|
||||||
+ Options.options.jobs = jobs
|
+ elif jobs_set and jobs:
|
||||||
|
+ Options.options.jobs = int(jobs)
|
||||||
|
|
||||||
Build.BuildContext.CHECK_MAKEFLAGS = CHECK_MAKEFLAGS
|
Build.BuildContext.CHECK_MAKEFLAGS = CHECK_MAKEFLAGS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user