From patchwork Wed Jan 16 23:41:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 213093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 7EDA32C0090 for ; Thu, 17 Jan 2013 10:42:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8BF9F1020C3; Wed, 16 Jan 2013 23:42:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9iDsv-qkjLwQ; Wed, 16 Jan 2013 23:41:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D9202101CFC; Wed, 16 Jan 2013 23:41:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0857E8F74B for ; Wed, 16 Jan 2013 23:41:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6858E8C7E4 for ; Wed, 16 Jan 2013 23:41:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mFfjGInYTbWH for ; Wed, 16 Jan 2013 23:41:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by whitealder.osuosl.org (Postfix) with ESMTPS id 56ACF8C7DA for ; Wed, 16 Jan 2013 23:41:50 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id hm6so4000840wib.9 for ; Wed, 16 Jan 2013 15:41:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references; bh=pk88Uf5eEe5/wu4VrWInN2K5G7GFDZih/XuHHmnlEIc=; b=oFyPlXOKSioBEfn6TTOjcj60mNy6D6+A7OnCmlDOZlfGDW3vrlxhh5vYar2y9I2n3q CxjVRoMp6lD6oWt/VsBW7plw+24YqgqPWnu+Wlaqp+H9/n4dJCB5lnb99IXJCeakXEIU g1LTHBNFclxqamFlJiyFNmYDJDK1dqdDnfS92DmxXdofVIgpQtzo/zG0qMu3Bow8eTT3 Qhzbdlr4bnng/0D+HwOA9kNTM/7qtQYdnWL8Sms5XLcfytpQdZsNfP+tZheoNQjtRjQv VwZkQHGfZgWmUEGiVQZ0sC3R32P8ieUSZ95vdXbeQZ4SdMw8oPR0UZdu3tCmfbl86tsp CUzg== X-Received: by 10.195.13.11 with SMTP id eu11mr5148343wjd.39.1358379708643; Wed, 16 Jan 2013 15:41:48 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-68-44.w90-32.abo.wanadoo.fr. [90.32.147.44]) by mx.google.com with ESMTPS id bd7sm11572769wib.8.2013.01.16.15.41.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 16 Jan 2013 15:41:47 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Thu, 17 Jan 2013 00:41:35 +0100 Message-Id: <7d5b13e61ca5941293be6d1402c87ca990510e1b.1358379198.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH 1/6] pkg-infra: log current message X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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 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. 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" Reviewed-by: Markos Chandras --- 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)