All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] fs: add missing $$(sep) to pre- and post-command hooks code
Date: Mon, 6 Nov 2017 13:33:21 -0800	[thread overview]
Message-ID: <CAHQ1cqHOgxKncX3RCGdfYtbRf2p_q7wTBCznVgBN0mSJp7bXUQ@mail.gmail.com> (raw)
In-Reply-To: <20171103220843.GD3387@scaer>

On Fri, Nov 3, 2017 at 3:08 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Andrey, All,
>
> On 2017-11-03 11:49 -0700, Andrey Smirnov spake thusly:
>> When multiple hooks are registred, both pre-a and post-command hooks'
>> foreach loops need to have a separator at the end in order for the
>> code to work as intended. Without the separator all hooks end up as a
>> one single line command thus making all but the first hook into
>> no-ops.
>
> I had a hard time figuring out why they were ignored (and I was the one
> writing that). And it is pretty trivial: each hook is printed with
> PRINTF, which expands the hook in single quote, and there is no format
> string at all.
>
> So two hooks get expanded into (all on one line):
>     printf 'something expnded from first hook\n' print 'something else'
>
> and so on for the third and subsquent hooks. This should have been part
> of the commit message, I guess...
>
>> Fixes: 4628b6f3b4 ("fs: add pre- and post-command hooks")
>> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
>> Cc: Romain Naour <romain.naour@gmail.com>
>> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
>
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Yet, could you explain the use-case where you need other such hooks?
>

Can't say I necessarily have a use-case for it, but I was
experimenting with overriding certain aspects of
skeleton-init-systemd's behavior using custom hooks and realized that
none of them were working. Hence this patch.

Thanks,
Andrey Smirnov

  reply	other threads:[~2017-11-06 21:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 18:49 [Buildroot] [PATCH] fs: add missing $$(sep) to pre- and post-command hooks code Andrey Smirnov
2017-11-03 22:08 ` Yann E. MORIN
2017-11-06 21:33   ` Andrey Smirnov [this message]
2017-11-05 16:53 ` Arnout Vandecappelle
2017-11-26 20:23 ` Peter Korsgaard

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=CAHQ1cqHOgxKncX3RCGdfYtbRf2p_q7wTBCznVgBN0mSJp7bXUQ@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.