diff options
author | Yuta Hayama <hayama@lineo.co.jp> | 2023-07-05 15:06:35 +0900 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-08-01 06:17:28 -1000 |
commit | db2effd46d03eb3d92977f791bed26995bb8aad9 (patch) | |
tree | bfa2f1e531818b2bb919e087c8ca0ceb9fcd78b2 /meta/recipes-core/systemd | |
parent | e8eb6d3237fdbd32102db3d1831a3ab834802557 (diff) | |
download | poky-db2effd46d03eb3d92977f791bed26995bb8aad9.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: 70107f1bc33b45da794b7a24b7325eb476516fdf)
Signed-off-by: Yuta Hayama <hayama@lineo.co.jp>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d18b939fb08b37380ce95934da38e6522392621c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-core/systemd')
-rwxr-xr-x | meta/recipes-core/systemd/systemd-systemctl/systemctl | 2 |
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 | ||