From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH RFC] core: enable per-package log files
Date: Wed, 18 Oct 2017 00:58:20 +0200 [thread overview]
Message-ID: <07c2fee3-d73c-bb09-444d-2fcdf67415bf@mind.be> (raw)
In-Reply-To: <20171017154526.GA6368@bifrost>
On 17-10-17 17:45, Anisse Astier wrote:
> On Tue, Oct 17, 2017 at 02:01:41PM +0200, Arnout Vandecappelle wrote:
>>
>>
>> On 17-10-17 09:11, Thomas Petazzoni wrote:
[snip]
>> I don't see any way that it could break things, actually. But obviously it
>> *does* need to be tested more extensively.
>
> Indeed it does. I found another issue in the parsing, it turns out there
> might be many tabs at the beginning of a recipe, so they must be
> consumed greedily as well:
>
> @@ -46,6 +46,9 @@ for arg in args:
> elif line[0] == '+': # ignore
> dprint("jobserver MAKEFLAGS mode")
> line = line[1:]
> + elif line[0] == '\t': # eat additionnal tabs
> + dprint("more tabs")
> + line = line[1:]
That's not entirely correct either, because any other make character followed
by tab means the tab is part of the command. Better do line.lstrip('\t').
> else: # no more matching initial recipe character
> break
> if print_command:
>
>>
>>>>
>>>> Not many. I have only tested the qemu_aarch64_virt_defconfig which does
>>>> not contain much(~28 packages), but I was already able to fix a few
>>>> parsing issues.
>>>
>>> A bigger test is indeed needed to validate things. But let's see what
>>> others have to say first.
>>
>> Indeed, because I'm not in favour...
>>
>> - IMO 'make --output-sync=recurse' is sufficient to begin with.
Anisse, what's your POV about this? Do you see reasons why output-sync is
insufficient?
>>
>> - This script requires python3 for *any* build, but python3 is not currently a
>> dependency.
>>
>> - If the script is changed so it supports both 2 and 3, it still requires a
>> python invocation for every build step, which is slowing things down.
>>
>> - Even if it is converted to a shell script or sped up in a different way, it
>> will make things more complicated for IMO limited gain.
>
> I'm not sure it can be converted to pure shell because of the lexing issues
> (nested double quotes, etc.).
Something like this?
IFS="$(echo)"
for line in $2; do
sh -c "$line" 2>&1 | $1
done
Hm, stripping the first characters of $line is still to do...
> But this can still be optimized as well. Either by using a native program, by
> having a long running process that would receive commands through a pipe, or
> even by using a GNU make loadable module.
A GNU make loadable module, I never heard of that. Is that really an option?
That could really be useful, also for other things.
Regards,
Arnout
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2017-10-17 22:58 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 8:58 [Buildroot] Discussion on per-package logging Thomas Petazzoni
2017-10-11 9:05 ` Arnout Vandecappelle
2017-10-11 9:55 ` Thomas Petazzoni
2017-10-11 13:08 ` Yann E. MORIN
2017-10-11 13:19 ` Thomas Petazzoni
2017-10-11 14:10 ` Yann E. MORIN
2017-10-16 16:20 ` [Buildroot] [PATCH RFC] core: enable per-package log files Anisse Astier
2017-10-16 16:23 ` Anisse Astier
2017-10-16 16:52 ` Thomas Petazzoni
2017-10-16 21:18 ` Anisse Astier
2017-10-17 7:11 ` Thomas Petazzoni
2017-10-17 12:01 ` Arnout Vandecappelle
2017-10-17 12:11 ` Thomas Petazzoni
2017-10-17 14:44 ` Arnout Vandecappelle
2017-10-17 19:03 ` Thomas Petazzoni
2017-10-17 23:11 ` Arnout Vandecappelle
2017-10-18 6:57 ` Thomas Petazzoni
2017-10-18 7:44 ` Anisse Astier
2017-10-18 7:58 ` Thomas Petazzoni
2017-10-18 8:09 ` Anisse Astier
2017-10-18 8:11 ` Thomas Petazzoni
2017-10-18 9:05 ` Anisse Astier
2017-10-18 9:10 ` Thomas Petazzoni
2017-10-18 10:54 ` Arnout Vandecappelle
2017-10-18 11:36 ` Thomas Petazzoni
2017-10-18 10:57 ` Arnout Vandecappelle
2017-10-18 11:36 ` Thomas Petazzoni
2017-10-18 17:42 ` Yann E. MORIN
2017-10-17 15:45 ` Anisse Astier
2017-10-17 22:58 ` Arnout Vandecappelle [this message]
2017-10-18 6:53 ` Thomas Petazzoni
2017-10-18 7:34 ` Anisse Astier
2017-10-17 15:53 ` Anisse Astier
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=07c2fee3-d73c-bb09-444d-2fcdf67415bf@mind.be \
--to=arnout@mind.be \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox