diff options
| -rw-r--r-- | meta/classes/package_ipk.bbclass | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 5cc7e0a7b2..d2ce3b3e17 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
| @@ -148,16 +148,9 @@ def ipk_write_pkg(pkg, d): | |||
| 148 | description = localdata.getVar('DESCRIPTION') or "." | 148 | description = localdata.getVar('DESCRIPTION') or "." |
| 149 | description = textwrap.dedent(description).strip() | 149 | description = textwrap.dedent(description).strip() |
| 150 | if '\\n' in description: | 150 | if '\\n' in description: |
| 151 | # Manually indent | 151 | # Manually indent: multiline description includes a leading space |
| 152 | for t in description.split('\\n'): | 152 | for t in description.split('\\n'): |
| 153 | # We don't limit the width when manually indent, but we do | 153 | ctrlfile.write(' %s\n' % (t.strip() or ' .')) |
| 154 | # need the textwrap.fill() to set the initial_indent and | ||
| 155 | # subsequent_indent, so set a large width | ||
| 156 | line = textwrap.fill(t.strip(), | ||
| 157 | width=100000, | ||
| 158 | initial_indent=' ', | ||
| 159 | subsequent_indent=' ') or '.' | ||
| 160 | ctrlfile.write('%s\n' % line) | ||
| 161 | else: | 154 | else: |
| 162 | # Auto indent | 155 | # Auto indent |
| 163 | ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' ')) | 156 | ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' ')) |
