diff options
| author | Yuta Hayama <hayama@lineo.co.jp> | 2023-07-05 15:06:35 +0900 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-08-02 04:47:13 -1000 |
| commit | 162ca7a55c0f09684de87c05a88d4aada01448d6 (patch) | |
| tree | 163f561f545f5f922e88029c2906e2fe12e3b9ac /meta | |
| parent | 23af44f25450baf0d715b152b3fe008297377ae1 (diff) | |
| download | poky-162ca7a55c0f09684de87c05a88d4aada01448d6.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: 392f60b0aa775ce95c3494ae87551e7954c9925b)
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')
| -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 c8b5c9efe3..0fd7e24085 100755 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl | |||
| @@ -191,7 +191,7 @@ class SystemdUnit(): | |||
| 191 | try: | 191 | try: |
| 192 | for dependent in config.get('Install', prop): | 192 | for dependent in config.get('Install', prop): |
| 193 | # expand any %i to instance (ignoring escape sequence %%) | 193 | # expand any %i to instance (ignoring escape sequence %%) |
| 194 | dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent) | 194 | dependent = re.sub("([^%](%%)*)%i", "\\g<1>{}".format(instance), dependent) |
| 195 | wants = systemdir / "{}.{}".format(dependent, dirstem) / service | 195 | wants = systemdir / "{}.{}".format(dependent, dirstem) / service |
| 196 | add_link(wants, target) | 196 | add_link(wants, target) |
| 197 | 197 | ||
