Openembedded Core Discussions
 help / color / mirror / Atom feed
* Using package specific DESCRIPTION with do_split_packages
@ 2015-11-04 16:04 Peter Urbanec
  0 siblings, 0 replies; only message in thread
From: Peter Urbanec @ 2015-11-04 16:04 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2580 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 3610 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-04 16:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 16:04 Using package specific DESCRIPTION with do_split_packages Peter Urbanec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox