poky.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: Lincoln.Ramsay@digi.com
Cc: poky@lists.yoctoproject.org
Subject: Re: [poky] Cannot enable a templated service where the instance starts with a number
Date: Thu, 6 Jul 2023 11:50:02 +0200	[thread overview]
Message-ID: <CANNYZj9yMacnjCvZCXnc0QYUrCxYPFPpPUsgziigkqsfonmnhg@mail.gmail.com> (raw)
In-Reply-To: <zaH1.1688603807958251008.7uhU@lists.yoctoproject.org>

The patch should be sent with 'git send-email' to openembedded-core
mailing list. You can find out more at
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded

Alex

On Thu, 6 Jul 2023 at 02:36, Ramsay, Lincoln via
lists.yoctoproject.org
<Lincoln.Ramsay=digi.com@lists.yoctoproject.org> wrote:
>
> Hi folks,
>
> We just tried to update our poky submodule (kirkstone branch) and hit a problem because of this change: https://git.yoctoproject.org/poky/commit/?h=kirkstone&id=7f8a4aa6cf240a5cdda012837f3f3f7a0f9bbf1c
>
> The problem is that we install some templated services like so:
>
> SYSTEMD_SERVICE:${PN} = "\
>     wsapi-fcgi.socket \
>     wsapi-fcgi@1.service \
>
> In do_rootfs, the poky systemctl is told to enable the service and so instance is set to "1".
>
> The problem is that the re.sub uses \\1 and then pastes the instance name in, so in our case, it ends up as \\11, which fails because there is only 1 match in the pattern.
>
> python has a solution for this, which is to use \\g<1>.
>
> eg.
>
> -                dependent = re.sub("([^%](%%)*)%i", "\\1{}".format(instance), dependent)
> +                dependent = re.sub("([^%](%%)*)%i", "\\g<1>{}".format(instance), dependent)
>
> I am not sure which other poky branches this change is on... presumably at least all of the newer ones.
>
> I'm not sure of the normal process for proposing patches to poky, hence this email.
>
> Thanks,
> Lincoln
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#13103): https://lists.yoctoproject.org/g/poky/message/13103
> Mute This Topic: https://lists.yoctoproject.org/mt/99977115/1686489
> Group Owner: poky+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


      reply	other threads:[~2023-07-06  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06  0:36 Cannot enable a templated service where the instance starts with a number Ramsay, Lincoln
2023-07-06  9:50 ` Alexander Kanavin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANNYZj9yMacnjCvZCXnc0QYUrCxYPFPpPUsgziigkqsfonmnhg@mail.gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=Lincoln.Ramsay@digi.com \
    --cc=poky@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).