summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuta Hayama <hayama@lineo.co.jp>2023-07-27 17:19:43 +0900
committerSteve Sakoman <steve@sakoman.com>2023-08-16 03:55:13 -1000
commit98d8fdd7ea72d62535901d16c88873f5ac179adf (patch)
treeba30750841b91ac1b7496070e1e96a48dae2e8f1
parent6b17a4af6af5acc0a829718f210650bf0848fc5f (diff)
downloadpoky-98d8fdd7ea72d62535901d16c88873f5ac179adf.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) (From OE-Core rev: 682e094e6af67e67873f7f08dd8d52b40fcdbded) Signed-off-by: Yuta Hayama <hayama@lineo.co.jp> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-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 b890bdd6f0..e003c860e3 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -189,7 +189,7 @@ class SystemdUnit():
189 try: 189 try:
190 for dependent in config.get('Install', prop): 190 for dependent in config.get('Install', prop):
191 # expand any %i to instance (ignoring escape sequence %%) 191 # expand any %i to instance (ignoring escape sequence %%)
192 dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent) 192 dependent = re.sub("([^%](%%)*)%i", "\\g<1>{}".format(instance), dependent)
193 wants = systemdir / "{}.{}".format(dependent, dirstem) / service 193 wants = systemdir / "{}.{}".format(dependent, dirstem) / service
194 add_link(wants, target) 194 add_link(wants, target)
195 195