diff options
Diffstat (limited to 'meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch')
-rw-r--r-- | meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch new file mode 100644 index 0000000000..69668c088a --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/0001-waf-sanitize-and-fix-added-cross-answer.patch @@ -0,0 +1,60 @@ +From 1b32c7d7f148bcf2598799b21dfa3ba1ed824d32 Mon Sep 17 00:00:00 2001 +From: Uri Simchoni <urisimchoni@gmail.com> +Date: Mon, 18 May 2015 21:12:06 +0300 +Subject: [PATCH 1/7] waf: sanitize and fix added cross answer + +When configuring samba for cross-compilation using the cross-answers +method, the function add_answer receives the standard output and exit code +of a configuration test and updates the cross-answers file accordingly. + +This patch sanitizes the standard output to conform to the cross-answers +file format - one line of output. It also adds a missing newline. + +(Note - at this point add_answer is only ever called with empty output +but this change is significant for the reminder of this patchset) + +Signed-off-by: Uri Simchoni <urisimchoni@gmail.com> +Reviewed-by: Andrew Bartlett <abartlet@samba.org> +Reviewed-by: Alexander Bokovoy <ab@samba.org> + +Upstream-Status: Backport + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + buildtools/wafsamba/samba_cross.py | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py +index 3838e34..fc1d78e 100644 +--- a/buildtools/wafsamba/samba_cross.py ++++ b/buildtools/wafsamba/samba_cross.py +@@ -19,6 +19,16 @@ def add_answer(ca_file, msg, answer): + except: + Logs.error("Unable to open cross-answers file %s" % ca_file) + sys.exit(1) ++ (retcode, retstring) = answer ++ # if retstring is more than one line then we probably ++ # don't care about its actual content (the tests should ++ # yield one-line output in order to comply with the cross-answer ++ # format) ++ retstring = retstring.strip() ++ if len(retstring.split('\n')) > 1: ++ retstring = '' ++ answer = (retcode, retstring) ++ + if answer == ANSWER_OK: + f.write('%s: OK\n' % msg) + elif answer == ANSWER_UNKNOWN: +@@ -26,8 +36,7 @@ def add_answer(ca_file, msg, answer): + elif answer == ANSWER_FAIL: + f.write('%s: FAIL\n' % msg) + else: +- (retcode, retstring) = answer +- f.write('%s: (%d, "%s")' % (msg, retcode, retstring)) ++ f.write('%s: (%d, "%s")\n' % (msg, retcode, retstring)) + f.close() + + +-- +1.9.1 + |