[oe-commits] [bitbake] 02/03: bitbake: ConfHandler: Don't strip leading spaces

git at git.openembedded.org git at git.openembedded.org
Tue Feb 5 14:06:34 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 8c3bc15a7b5e0a81d7b6c9d3fe43fbff63207156
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Fri Jan 25 17:53:29 2019 +0800

    bitbake: ConfHandler: Don't strip leading spaces
    
    Fixed:
    - Add the following lines to conf/local.conf:
      FOO = "BAR1"
      FOO_append = "\
          BAR2"
    
      $ bitbake -e | grep '^FOO'
      FOO="BAR1BAR2"
    
      The leading spaces in the second line have been removed.
    
    - But if add the previous two lines to base.bbclass:
      $ bitbake -e | grep '^FOO'
      FOO="BAR1    BAR2"
    
      The leading spaces in the second line are preserved, this is inconsistent, now
      fix ConfHandler to preserve leading spaces.
    
    [YOCTO #12380]
    
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/parse/parse_py/ConfHandler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py
index 9d3ebe1..ea49f8c 100644
--- a/lib/bb/parse/parse_py/ConfHandler.py
+++ b/lib/bb/parse/parse_py/ConfHandler.py
@@ -147,7 +147,7 @@ def handle(fn, data, include):
             continue
         s = s.rstrip()
         while s[-1] == '\\':
-            s2 = f.readline().strip()
+            s2 = f.readline().rstrip()
             lineno = lineno + 1
             if (not s2 or s2 and s2[0] != "#") and s[0] == "#" :
                 bb.fatal("There is a confusing multiline, partially commented expression on line %s of file %s (%s).\nPlease clarify whether this is all a comment or should be parsed." % (lineno, fn, s))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list