classes-systemd: General refactoring
Take the more idiomatic approach of iterating on
SYSTEMD_PACKAGES to find service files.
The OBMC_SYSTEMD_SERVICE variable isn't meant to be used directly by
recipes. Rename it to something that seems less public.
Change-Id: If031937d4716b9c7e6ac1be506457e41109b69c1
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/classes/obmc-phosphor-utils.bbclass b/classes/obmc-phosphor-utils.bbclass
index 44ca7ad..036af9b 100644
--- a/classes/obmc-phosphor-utils.bbclass
+++ b/classes/obmc-phosphor-utils.bbclass
@@ -15,3 +15,15 @@
return value if df_enabled(feature, value, d) \
and mf_enabled(feature, value, d) \
else ""
+
+
+def set_append(d, var, val, sep=' '):
+ values = (d.getVar(var, True) or '').split(sep)
+ if filter(bool, values):
+ d.appendVar(var, '%s%s' %(sep, val))
+ else:
+ d.setVar(var, val)
+
+
+def listvar_to_list(d, list_var, sep=' '):
+ return filter(bool, (d.getVar(list_var, True) or '').split(sep))