Message ID | 20230706232157.3602573-1-lincoln.ramsay@digi.com |
---|---|
State | New |
Headers | show |
Series | [meta] systemctl: allow instance names starting with numbers | expand |
On 7 Jul 2023, at 00:21, Ramsay, Lincoln via lists.openembedded.org <Lincoln.Ramsay=digi.com@lists.openembedded.org> wrote: > - dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent) > + dependent = re.sub("([^%](%%)*)%i", "\\g<1>{}".format(instance), dependent) Interestingly, Yuta submitted the identical patch last week (queued for master). Ross
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(): 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)