diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2024-08-20 03:08:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-09-01 11:05:20 +0100 |
commit | 36fb595c62d9cc52caaac38e22de3c31350feb37 (patch) | |
tree | 7e172325f2216710a261758a298b5a1241e091cc /scripts/lib/scriptpath.py | |
parent | 5f380586305a74b8e2f5cecb57ae252e38b84bdc (diff) | |
download | poky-36fb595c62d9cc52caaac38e22de3c31350feb37.tar.gz |
systemd.bbclass: Clean up empty parent directories
Previously, rm_systemd_unitdir() would remove one parent directory of
${systemd_unitdir} if it was empty after removing ${systemd_unitdir}.
rm_sysvinit_initddir() would not remove any parent directory. Thus, if
the only directory created in /etc was /etc/init.d, an empty /etc would
remain after the cleanup and would be packaged.
Simplify rm_systemd_unitdir() and rm_sysvinit_initddir() by rewriting
them in shell, and use rmdir -p to remove all empty parent directories.
(From OE-Core rev: 73159c0bbc636a08934f47690885d75fd37b701a)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/scriptpath.py')
0 files changed, 0 insertions, 0 deletions