From: Andreas Ziegler <br025@umbiko.net>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: buildroot@buildroot.org, Marcus Hoffmann <buildroot@bubu1.eu>
Subject: Re: [Buildroot] [PATCH v3 1/2] package/mpd: use upstream mpd.conf w/ buildroot modifications
Date: Fri, 28 Aug 2026 02:53:24 +0000 [thread overview]
Message-ID: <8a0420a64d1bb3fb4a10205de4d502aa@umbiko.net> (raw)
In-Reply-To: <ao_Nj3une8D_aVEC@windsurf>
Ji Thomas,
On 2026-08-27 05:40, Thomas Petazzoni wrote:
> Hello Andreas,
>
> On Thu, Aug 27, 2026 at 05:26:38AM +0200, Andreas Ziegler wrote:
>> +# sed snippet from https://stackoverflow.com/a/37911473
>> +# single-line configurations will be inserted behind the last
>> matching line
>> +# in the target file, multi-line blocks are just appended at the
>> bottom.
>> define MPD_INSTALL_EXTRA_FILES
>> - $(INSTALL) -m 0644 -D package/mpd/mpd.conf
>> $(TARGET_DIR)/etc/mpd.conf
>> + $(INSTALL) -m 0644 -D $(@D)/doc/mpdconf.example
>> $(TARGET_DIR)/etc/mpd.conf
>> + export multiline=0
>> + while read -r line; do \
>> + if [[ $$line =~ ^[a-zA-Z] ]]; then \
>> + if [ "$${line##*[[:space:]]}" == "{" ]; then \
>> + export multiline=1; \
>> + printf "%s\n" "$$line" >> "$(TARGET_DIR)"/etc/mpd.conf; \
>> + else \
>> + [ $$multiline ] && \
>> + printf "\t%s\n" "$$line" >> "$(TARGET_DIR)"/etc/mpd.conf; \
>> + [ ! $$multiline ] && \
>> + sed
>> '/#'$${line%%[[:space:]]*}'[^\n]*/,$$!b;//{x;//p;g};//!H;$$!d;x;s||&\n'"$$line"'|'
>> -i "$(TARGET_DIR)"/etc/mpd.conf; \
>> + fi \
>> + elif [ "$$line" == "}" ]; then \
>> + printf "%s\n" "$$line" >> "$(TARGET_DIR)"/etc/mpd.conf; \
>> + export multiline=0; \
>> + fi \
>> + done < package/mpd/mpd.conf
>
> I am sorry, but this is way too complicated for Buildroot's KISS
> principle. Some much simpler approach needs to be found.
You might have a point: too much effort for a file that is probably
never used :-D
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
Kind regards,
Andreas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-08-28 2:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 3:26 [Buildroot] [PATCH v3 0/2] Add runtime test for mpd Andreas Ziegler
2026-08-27 3:26 ` [Buildroot] [PATCH v3 1/2] package/mpd: use upstream mpd.conf w/ buildroot modifications Andreas Ziegler
2026-08-27 5:40 ` Thomas Petazzoni via buildroot
2026-08-28 2:53 ` Andreas Ziegler [this message]
2026-08-27 3:26 ` [Buildroot] [PATCH v3 2/2] support/testing: add runtime test for mpd Andreas Ziegler
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=8a0420a64d1bb3fb4a10205de4d502aa@umbiko.net \
--to=br025@umbiko.net \
--cc=buildroot@bubu1.eu \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
/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.