Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Urbanec <openembedded-devel@urbanec.net>
To: openembedded-core@lists.openembedded.org
Subject: Using package specific DESCRIPTION with do_split_packages
Date: Thu, 5 Nov 2015 03:04:35 +1100	[thread overview]
Message-ID: <563A2C93.7060506@urbanec.net> (raw)

[-- 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 --]

                 reply	other threads:[~2015-11-04 16:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=563A2C93.7060506@urbanec.net \
    --to=openembedded-devel@urbanec.net \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox