[OE-core] Using package specific DESCRIPTION with do_split_packages

Peter Urbanec openembedded-devel at urbanec.net
Wed Nov 4 16:04:35 UTC 2015


Hi,

I've been wrestling with do_split_packages and package_ipk trying to 
generate packages that have a customised DESCRIPTION override. I could 
not get it to work. Here is roughly what I tried:

--- mytest.bb start ---
SUMMARY = "Generic summary"
DESCRIPTION = "Generic description"
...
DESCRIPTION_mytest-plugin-item1 = "Description specific to item1"
DESCRIPTION_mytest-plugin-item2 = "Description specific to item2"
...
RDEPENDS_mytest-plugin-item1 = "python-requests"
...
python populate_packages_prepend() {
     mytest_plugindir = bb.data.expand('${libdir}/mytest/Plugins', d)
     do_split_packages(d, mytest_plugindir, 
'^(\w+/\w+)/[a-zA-Z0-9_]+.*$', 'mytest-plugin-%s', 
'${DESCRIPTION_mytest-plugin-%s}', recursive=True, match_path=True, 
prepend=True)
     do_split_packages(d, mytest_plugindir, '^(\w+/\w+)/.*\.py$', 
'mytest-plugin-%s-src', '%s (source files)', recursive=True, 
match_path=True, prepend=True)
}

--- mytest.bb end ---

The .ipk files generated using do_split_packages always have the generic 
description and summary, instead of using the package specific versions. 
I've tried a number of variants of the above, but without any luck.

In the end I ended up making the following changes. I have a feeling 
that this is not the right solution, but I'm at a loss as to a more 
appropriate way of doing what I want. Any suggestions?

diff --git a/meta/classes/package_ipk.bbclass 
b/meta/classes/package_ipk.bbclass
index dba6804..f7f61c7 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -138,9 +138,9 @@ python do_package_ipk () {
                          raise KeyError(f)
                  # Special behavior for description...
                  if 'DESCRIPTION' in fs:
-                    summary = localdata.getVar('SUMMARY', True) or 
localdata.getVar('DESCRIPTION', True) or "."
+                    summary = localdata.getVar('SUMMARY_' + pkgname, 
True) or localdata.getVar('SUMMARY', True) or 
localdata.getVar('DESCRIPTION_' + pkgname, True) or 
localdata.getVar('DESCRIPTION', True) or "."
                      ctrlfile.write('Description: %s\n' % summary)
-                    description = localdata.getVar('DESCRIPTION', True) 
or "."
+                    description = localdata.getVar('DESCRIPTION_' + 
pkgname, True) or localdata.getVar('DESCRIPTION', True) or "."
                      description = textwrap.dedent(description).strip()
                      if '\\n' in description:
                          # Manually indent

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20151105/353aa82a/attachment-0002.html>


More information about the Openembedded-core mailing list