summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_ipk.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2010-09-29 10:11:24 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2010-10-11 22:13:14 +0100
commitb2f2590e6c566d1ed4df87cf52279106497d584d (patch)
tree3e0b27e130a0f878f87b8843e9486411925e5a96 /meta/classes/package_ipk.bbclass
parent5783e717ee9f503d8e03992306a6b9ddfda6f73e (diff)
downloadpoky-b2f2590e6c566d1ed4df87cf52279106497d584d.tar.gz
Add Summary/Description support to packaging
[BUGID #281] Add the ability for the deb, ipk and rpm classes to use the new summary and description fields. The Description is wrapped around 75 characters to ensure a reasonably nice, presentable description. (Summary defaults to the description if Summary is not defined.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/package_ipk.bbclass')
-rw-r--r--meta/classes/package_ipk.bbclass11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 1758283f61..cac0453685 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -135,6 +135,7 @@ package_generate_archlist () {
135 135
136python do_package_ipk () { 136python do_package_ipk () {
137 import re, copy 137 import re, copy
138 import textwrap
138 139
139 workdir = bb.data.getVar('WORKDIR', d, True) 140 workdir = bb.data.getVar('WORKDIR', d, True)
140 outdir = bb.data.getVar('PKGWRITEDIRIPK', d, True) 141 outdir = bb.data.getVar('PKGWRITEDIRIPK', d, True)
@@ -227,7 +228,15 @@ python do_package_ipk () {
227 for f in fs: 228 for f in fs:
228 if bb.data.getVar(f, localdata) is None: 229 if bb.data.getVar(f, localdata) is None:
229 raise KeyError(f) 230 raise KeyError(f)
230 ctrlfile.write(c % tuple(pullData(fs, localdata))) 231 # Special behavior for description...
232 if 'DESCRIPTION' in fs:
233 summary = bb.data.getVar('SUMMARY', localdata, True) or bb.data.getVar('DESCRIPTION', localdata, True) or "."
234 description = bb.data.getVar('DESCRIPTION', localdata, True) or "."
235 description = textwrap.dedent(description).strip()
236 ctrlfile.write('Description: %s\n' % summary)
237 ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' '))
238 else:
239 ctrlfile.write(c % tuple(pullData(fs, localdata)))
231 except KeyError: 240 except KeyError:
232 import sys 241 import sys
233 (type, value, traceback) = sys.exc_info() 242 (type, value, traceback) = sys.exc_info()