summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-systemctl
diff options
context:
space:
mode:
authorYuta Hayama <hayama@lineo.co.jp>2023-07-05 15:06:35 +0900
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-07-10 11:36:34 +0100
commitd0a5ec84b40a9e1a8ca10f16259d7dfd3f2d45e4 (patch)
treeefb7fd98ebff4746c1a0b759c8fb3444d68ffb4f /meta/recipes-core/systemd/systemd-systemctl
parentbed76c8b4869be839893221b462c290004ee0eb4 (diff)
downloadpoky-d0a5ec84b40a9e1a8ca10f16259d7dfd3f2d45e4.tar.gz
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>
Diffstat (limited to 'meta/recipes-core/systemd/systemd-systemctl')
-rwxr-xr-xmeta/recipes-core/systemd/systemd-systemctl/systemctl2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 514f747fe6..7fe751b397 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -202,7 +202,7 @@ class SystemdUnit():
202 try: 202 try:
203 for dependent in config.get('Install', prop): 203 for dependent in config.get('Install', prop):
204 # expand any %i to instance (ignoring escape sequence %%) 204 # expand any %i to instance (ignoring escape sequence %%)
205 dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent) 205 dependent = re.sub("([^%](%%)*)%i", "\\g<1>{}".format(instance), dependent)
206 wants = systemdir / "{}.{}".format(dependent, dirstem) / service 206 wants = systemdir / "{}.{}".format(dependent, dirstem) / service
207 add_link(wants, target) 207 add_link(wants, target)
208 208