]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake: ConfHandler: Don't strip leading spaces
authorRobert Yang <liezhi.yang@windriver.com>
Fri, 25 Jan 2019 09:53:29 +0000 (17:53 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Feb 2019 08:24:50 +0000 (08:24 +0000)
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]

(Bitbake rev: 8c3bc15a7b5e0a81d7b6c9d3fe43fbff63207156)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/parse/parse_py/ConfHandler.py

index 9d3ebe16f45679e2103118f871c1aec3a68eb31c..ea49f8ca93d7c05f1811e7e3902d8c117af860db 100644 (file)
@@ -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))