diff options
author | Ulf Magnusson <Ulf.Magnusson@bmw-carit.de> | 2016-04-01 10:53:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-03 15:51:35 +0100 |
commit | dea34232b8bec19489933b8d02df3aa0b543e148 (patch) | |
tree | a05848d05751970857e8b53fa93feb530d6efa58 | |
parent | 5defbcd92febf7ff434a5c9089036b28bd8cd8f3 (diff) | |
download | openembedded-core-contrib-dea34232b8bec19489933b8d02df3aa0b543e148.tar.gz |
classes/packagegroup: Refactor code to be simpler
This makes the code a bit shorter and more readable.
(From OE-Core rev: f092f99a0d7116ba4347b22f3f81b4eac4808e62)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/packagegroup.bbclass | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass index d56248f2de..38bdbd3822 100644 --- a/meta/classes/packagegroup.bbclass +++ b/meta/classes/packagegroup.bbclass @@ -22,19 +22,15 @@ inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'al # Also mark all packages as ALLOW_EMPTY python () { packages = d.getVar('PACKAGES', True).split() - for pkg in packages: - d.setVar("ALLOW_EMPTY_%s" % pkg, "1") if d.getVar('PACKAGEGROUP_DISABLE_COMPLEMENTARY', True) != '1': - # Add complementary packagegroups - genpackages = [] - complementary_types = ['-dbg', '-dev'] + types = ['', '-dbg', '-dev'] if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): - complementary_types.append('-ptest') - for pkg in packages: - for postfix in complementary_types: - genpackages.append(pkg+postfix) - d.setVar("ALLOW_EMPTY_%s" % pkg+postfix, "1") - d.setVar('PACKAGES', ' '.join(packages+genpackages)) + types.append('-ptest') + packages = [pkg + suffix for pkg in packages + for suffix in types] + d.setVar('PACKAGES', ' '.join(packages)) + for pkg in packages: + d.setVar('ALLOW_EMPTY_%s' % pkg, '1') } # We don't want to look at shared library dependencies for the |