diff options
author | Ross Burton <ross.burton@intel.com> | 2013-04-04 17:34:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-04 23:52:21 +0100 |
commit | 0e904db7da34295220841c1e96b8ddc24dfa97ee (patch) | |
tree | 66feaae496c4a96b2523dad00cb3734c1402ae67 /meta/lib/oe/utils.py | |
parent | 59e425455fb0a01a0928f366538fc8382075d85e (diff) | |
download | poky-0e904db7da34295220841c1e96b8ddc24dfa97ee.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".
(From OE-Core rev: 3115187e468398a8c1edaf3e5369a2d10fb112f4)
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.py | 16 |
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): | |||
107 | 107 | ||
108 | if addfeatures: | 108 | if addfeatures: |
109 | d.appendVar(var, " " + " ".join(addfeatures)) | 109 | d.appendVar(var, " " + " ".join(addfeatures)) |
110 | |||
111 | |||
112 | def packages_filter_out_system(d): | ||
113 | """ | ||
114 | Return a list of packages from PACKAGES with the "system" packages such as | ||
115 | PN-dbg PN-doc PN-locale-eb-gb removed. | ||
116 | """ | ||
117 | pn = d.getVar('PN', True) | ||
118 | blacklist = map(lambda suffix: pn + suffix, ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev')) | ||
119 | localepkg = pn + "-locale-" | ||
120 | pkgs = [] | ||
121 | |||
122 | for pkg in d.getVar('PACKAGES', True).split(): | ||
123 | if pkg not in blacklist and localepkg not in pkg: | ||
124 | pkgs.append(pkg) | ||
125 | return pkgs | ||