]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_ipk.bbclass: Replace empty lines in DESCRIPTION with '.'
authorMariano Lopez <mariano.lopez@linux.intel.com>
Wed, 5 Apr 2017 18:46:35 +0000 (11:46 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Apr 2017 21:48:04 +0000 (22:48 +0100)
opkg uses empty lines as separator for next package and if an ipk file was
packaged with empty lines in DESCRIPTION opkg won't be able to handle such ipk
file, this happens at execution time.

This commit will replace empty lines in DESCRIPTION with a '.' when generating
an ipk package to avoid this issue.

[YOCTO #10677]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_ipk.bbclass

index fa47385fa84f49d05e173c1b2b7eec3dca79dde2..c7cec9d63d169e6e7f1937d704a0ce08bf53144a 100644 (file)
@@ -145,7 +145,11 @@ python do_package_ipk () {
                         # We don't limit the width when manually indent, but we do
                         # need the textwrap.fill() to set the initial_indent and
                         # subsequent_indent, so set a large width
-                        ctrlfile.write('%s\n' % textwrap.fill(t.strip(), width=100000, initial_indent=' ', subsequent_indent=' '))
+                        line = textwrap.fill(t.strip(),
+                                             width=100000,
+                                             initial_indent=' ',
+                                             subsequent_indent=' ') or '.'
+                        ctrlfile.write('%s\n' % line)
                 else:
                     # Auto indent
                     ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' '))