All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/6] pkg-infra: log current message
Date: Sun, 20 Jan 2013 14:49:30 +0100	[thread overview]
Message-ID: <50FBF5EA.5010303@mind.be> (raw)
In-Reply-To: <7d5b13e61ca5941293be6d1402c87ca990510e1b.1358379198.git.yann.morin.1998@free.fr>

On 01/17/13 00:41, Yann E. MORIN wrote:
> In order to help the auto-builders (our own, or in-house ones),
> just log the current message in a file that contains:
>      Package: $($(PKG)_NAME)
>      Version: $($(PKG)_VERSION)
>      Action : Last '>>>' message displayed
>
> For example:
>      Package: host-fakeroot
>      Version: 1.18.2
>      Action : Configuring
>
> If there is no package, then the package name and version are
> empty, eg.:
>      Package:
>      Version:
>      Action : Generating root filesystem image rootfs.tar

  I'm a bit concerned because this is another blocker for top-level 
parallel build (the contents of last-action will be incorrect).

  Also:

> Also, all messages are logged to a file, one per line, with the
> date each message was generated at, as the number of seconds
> elapsed since Epoch.

  I think this one should be sufficient for the autobuilder. It's exactly 
what is displayed now. You could make it more structured and easily 
parseable with an extra colon:

echo "$$(date '+%s'): $($(PKG)_NAME) $($(PKG)_VERSION): $(1)"


  Note that this one is not an issue for parallel builds, because it will 
be done in a single write() call.


  Regards,
  Arnout

> This will hopefully help autobuilders extract the real reason for
> a failure, and take appropriate action (eg. bug-mail the last
> git-author of a package...)
>
> Signed-off-by: "Yann E. MORIN"<yann.morin.1998@free.fr>
> ---
>   package/pkg-utils.mk |    9 ++++++++-
>   1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index 835c588..477be57 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -64,7 +64,14 @@ INFLATE.xz   = $(XZCAT)
>   INFLATE.tar  = cat
>
>   # MESSAGE Macro -- display a message in bold type
> -MESSAGE     = echo "$(TERM_BOLD)>>>  $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
> +define MESSAGE
> +	echo "$(TERM_BOLD)>>>  $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)";   \
> +	echo "$$(date '+%s'): $($(PKG)_NAME) $($(PKG)_VERSION) $(1)"                 \
> +	>>$(BUILD_DIR)/actions.log;                                             \
> +	printf "Package: %s\nVersion: %s\nAction : %s\n"                             \
> +	       "$($(PKG)_NAME)" "$($(PKG)_VERSION)" $(1)                             \
> +	>$(BUILD_DIR)/last-action
> +endef
>   TERM_BOLD  := $(shell tput smso)
>   TERM_RESET := $(shell tput rmso)
>


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  parent reply	other threads:[~2013-01-20 13:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 23:41 [Buildroot] [pull request] Pull request for branch yem-instrument-build Yann E. MORIN
2013-01-16 23:41 ` [Buildroot] [PATCH 1/6] pkg-infra: log current message Yann E. MORIN
2013-01-17 15:22   ` Markos Chandras
2013-01-20 13:49   ` Arnout Vandecappelle [this message]
2013-01-20 14:10     ` Yann E. MORIN
2013-01-20 14:38     ` Thomas Petazzoni
2013-01-20 14:59       ` Yann E. MORIN
2013-01-16 23:41 ` [Buildroot] [PATCH 2/6] toolchain/external: sprinkle with some calls to MESSAGE Yann E. MORIN
2013-01-20 13:51   ` Arnout Vandecappelle
2013-01-16 23:41 ` [Buildroot] [PATCH 3/6] toolchain/crosstool-ng: " Yann E. MORIN
2013-01-20 13:56   ` Arnout Vandecappelle
2013-01-20 14:27     ` Yann E. MORIN
2013-01-16 23:41 ` [Buildroot] [PATCH 4/6] toolchain/gcc: " Yann E. MORIN
2013-01-18 16:13   ` Markos Chandras
2013-01-20 14:01   ` Arnout Vandecappelle
2013-01-16 23:41 ` [Buildroot] [PATCH 5/6] toolchain/kernel-headers: " Yann E. MORIN
2013-01-18 16:16   ` Markos Chandras
2013-01-20 14:04   ` Arnout Vandecappelle
2013-01-16 23:41 ` [Buildroot] [PATCH 6/6] toolchain/uClibc: " Yann E. MORIN
2013-01-18 16:12   ` Markos Chandras
2013-01-20 14:02 ` [Buildroot] [pull request] Pull request for branch yem-instrument-build Arnout Vandecappelle
2013-01-20 14:03 ` [Buildroot] [PATCH] fs/common.mk: delay evaluation of variables Arnout Vandecappelle
2013-01-20 19:59   ` Peter Korsgaard
2013-01-20 14:10 ` [Buildroot] [pull request] Pull request for branch yem-instrument-build Thomas Petazzoni
2013-01-20 14:22   ` Yann E. MORIN

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=50FBF5EA.5010303@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 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.