meta: Search also FILESEXTRAPATHS for systemd service files
PATCH 1/1 meta: Search also FILESEXTRAPATHS for systemd service files
Signed-off-by Jukka Rissanen <[email protected]>
--- meta/classes/systemd.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+)
meta/classes/systemd.bbclass +8 -0
@@ -1,3 +1,5 @@ +inherit utils + # The list of packages that should have systemd packaging scripts added. For # each entry, optionally have a SYSTEMD_SERVICE_[package] that lists the service # files in this package. If this variable isn't set, [package].service is used.
@@ -137,6 +139,7 @@ python systemd_populate_packages() { # single service gets also the /dev/null dummies keys = 'Also Conflicts' # scan for all in SYSTEMD_SERVICE[] + extrapaths = base_set_filespath([],d).split(":") for pkg_systemd in systemd_packages.split(): for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split(): path_found = ''
@@ -144,6 +147,11 @@ python systemd_populate_packages() { if os.path.exists(oe.path.join(d.getVar("D", True), path, service)): path_found = path break + if path_found == '': + for path in extrapaths: + if os.path.exists(oe.path.join(path, service)): + path_found = path + break if path_found != '': systemd_add_files_and_parse(pkg_systemd, path_found, service, keys) else:
Signature · 1 line
1.7.11.4
Hi,
First, mails that patch oe-core should be sent to the oe-core list, not yocto@ (which is more of a support channel).
Second this patch won't do what you expect - when you find a file in FILESEXTRAPATHS it isn't being installed, so it won't be in the package.
I intentionally removed code that did something similar from the original systemd.bbclass as generally a service file will have to be processed in some way to put the right paths in: hardcoding /usr/sbin/some-daemon isn't sufficient when the distribution can change the value of $sbindir.
Ross