mirror of
https://git.yoctoproject.org/poky
synced 2026-02-13 20:23:04 +01:00
systemd-systemctl: fix errors in instance name expansion
If the instance name indicated by %i begins with a number, the meaning of the
replacement string "\\1{}".format(instance) is ambiguous.
To indicate group number 1 regardless of the instance name, use "\g<1>".
(From OE-Core rev: d18b939fb08b37380ce95934da38e6522392621c)
Signed-off-by: Yuta Hayama <hayama@lineo.co.jp>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
bed76c8b48
commit
d0a5ec84b4
@@ -202,7 +202,7 @@ class SystemdUnit():
|
||||
try:
|
||||
for dependent in config.get('Install', prop):
|
||||
# expand any %i to instance (ignoring escape sequence %%)
|
||||
dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent)
|
||||
dependent = re.sub("([^%](%%)*)%i", "\\g<1>{}".format(instance), dependent)
|
||||
wants = systemdir / "{}.{}".format(dependent, dirstem) / service
|
||||
add_link(wants, target)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user