mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 13:49:49 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
59e425455f
commit
0e904db7da
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user