diff options
author | Khang D Nguyen <khangng@os.amperecomputing.com> | 2025-08-19 05:40:27 +0300 |
---|---|---|
committer | Khang D Nguyen <khangng@os.amperecomputing.com> | 2025-08-22 11:16:04 +0300 |
commit | 21b3dd060a30c0bb0fc945ed61963455aca8dcad (patch) | |
tree | 04246087b23bfa685eba34347d294e79fa05a9c9 /meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib/0001-Do-not-download-external-dependency-tarballs-via-mes.patch | |
parent | 3b0708ed2c4683b1679b994ffe3361c86dc8b2ca (diff) | |
download | openbmc-21b3dd060a30c0bb0fc945ed61963455aca8dcad.tar.xz |
systemd.bbclass: deduplicate template and instance lines in preset file
If SYSTEMD_SERVICE contains both template and instance names, the
preset file will contain two lines: one describing the template name
and one describing the instance names.
This is problematic because systemd.preset only use the first matching
one [1], leading to the instances not getting enabled.
For example, openbmc's obmc-console recipe has the following
final SYSTEMD_SERVICE variable:
```
SYSTEMD_SERVICE:obmc-console = " \
obmc-console@.service \
obmc-console-ssh@.service \
obmc-console-ssh@2200.service \
"
```
The resulting preset file will contain lines with the same name:
```
enable obmc-console@.service
enable obmc-console-ssh@.service
enable obmc-console-ssh@.service 2200
```
Fix this by interpreting the template name as a special case of empty
instances.
Tested: preset files are generated correctly:
```
enable obmc-console@.service
enable obmc-console-ssh@.service 2200
```
[1]: https://www.freedesktop.org/software/systemd/man/257/systemd.preset.html#Preset%20File%20Format
Fixes: f33d9b1f434e ("systemd.bbclass: generate preset for templates")
Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
(cherry picked from commit 7cdf10840c200a327b6336775698342af7212ee4)
Change-Id: I6a6a6964fd8715e6916d68f9b56b35fb9f83f33d
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-matplotlib/0001-Do-not-download-external-dependency-tarballs-via-mes.patch')
0 files changed, 0 insertions, 0 deletions