summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorUlf Magnusson <Ulf.Magnusson@bmw-carit.de>2016-04-01 10:53:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-03 15:51:35 +0100
commitdea34232b8bec19489933b8d02df3aa0b543e148 (patch)
treea05848d05751970857e8b53fa93feb530d6efa58 /meta
parent5defbcd92febf7ff434a5c9089036b28bd8cd8f3 (diff)
downloadpoky-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>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/packagegroup.bbclass18
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
22# Also mark all packages as ALLOW_EMPTY 22# Also mark all packages as ALLOW_EMPTY
23python () { 23python () {
24 packages = d.getVar('PACKAGES', True).split() 24 packages = d.getVar('PACKAGES', True).split()
25 for pkg in packages:
26 d.setVar("ALLOW_EMPTY_%s" % pkg, "1")
27 if d.getVar('PACKAGEGROUP_DISABLE_COMPLEMENTARY', True) != '1': 25 if d.getVar('PACKAGEGROUP_DISABLE_COMPLEMENTARY', True) != '1':
28 # Add complementary packagegroups 26 types = ['', '-dbg', '-dev']
29 genpackages = []
30 complementary_types = ['-dbg', '-dev']
31 if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): 27 if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
32 complementary_types.append('-ptest') 28 types.append('-ptest')
33 for pkg in packages: 29 packages = [pkg + suffix for pkg in packages
34 for postfix in complementary_types: 30 for suffix in types]
35 genpackages.append(pkg+postfix) 31 d.setVar('PACKAGES', ' '.join(packages))
36 d.setVar("ALLOW_EMPTY_%s" % pkg+postfix, "1") 32 for pkg in packages:
37 d.setVar('PACKAGES', ' '.join(packages+genpackages)) 33 d.setVar('ALLOW_EMPTY_%s' % pkg, '1')
38} 34}
39 35
40# We don't want to look at shared library dependencies for the 36# We don't want to look at shared library dependencies for the