summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/utils.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-04-04 17:34:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-04 23:52:17 +0100
commit3115187e468398a8c1edaf3e5369a2d10fb112f4 (patch)
treeaa7796b79a431b71ea837810cc85a6850ebc1e31 /meta/lib/oe/utils.py
parent31c58d584f838738a6b6258b87b1c7e6ca173086 (diff)
downloadopenembedded-core-3115187e468398a8c1edaf3e5369a2d10fb112f4.tar.gz
utils: add helper to get all non-system packages
For example if PACKAGES is "foo foo-data foo-dev foo-doc", this will return "foo-data". Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r--meta/lib/oe/utils.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index b269f32277..acd39693b5 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -107,3 +107,19 @@ def features_backfill(var,d):
if addfeatures:
d.appendVar(var, " " + " ".join(addfeatures))
+
+
+def packages_filter_out_system(d):
+ """
+ Return a list of packages from PACKAGES with the "system" packages such as
+ PN-dbg PN-doc PN-locale-eb-gb removed.
+ """
+ pn = d.getVar('PN', True)
+ blacklist = map(lambda suffix: pn + suffix, ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev'))
+ localepkg = pn + "-locale-"
+ pkgs = []
+
+ for pkg in d.getVar('PACKAGES', True).split():
+ if pkg not in blacklist and localepkg not in pkg:
+ pkgs.append(pkg)
+ return pkgs