From patchwork Sun Jan 20 16:03:51 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: 213963 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 4B22D2C007E for ; Mon, 21 Jan 2013 03:06:03 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1BA6E102452; Sun, 20 Jan 2013 16:05:51 +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 D3yDI0Ncs8jo; Sun, 20 Jan 2013 16:05:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E9F14101B9A; Sun, 20 Jan 2013 16:04:17 +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 542608F74B for ; Sun, 20 Jan 2013 16:04:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 943728B287 for ; Sun, 20 Jan 2013 16:04:12 +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 d1drIkycsIuB for ; Sun, 20 Jan 2013 16:04:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0DA0D8B523 for ; Sun, 20 Jan 2013 16:04:10 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id r1so1461187wey.1 for ; Sun, 20 Jan 2013 08:04:09 -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=NVENCm7VITH+89fnyWf2MJdvdfX47+3LSMqrAM+zve2XcW1G8T4GPj+cipF42eEU/j ca+jyv0JZSC1DMvMWNPWao1MXv7gXGHbHqVB042K6ZC3uFIFm7yNqKWo+fFwUQ8NNTM5 4V5SbygQL0yT1Zt73mOwGrpOjN/yRAZOqlx5z+kk3S0w+nt7z5EowDCDFAMcy8Y9LvIN ryw71mUhzLmWNBhNrXPJZQjPDG/mLcpsHV6AhS5Cc7jqaZLPccGQOx+FyJF+rKMOofPS inJvKeU+I/rbPf9Z3qrZCMio5nd4IM1JeLzbDOagfMOUnHr6Mxf9xQ7uo0NET1d0lMmy EVPg== X-Received: by 10.180.14.2 with SMTP id l2mr11583100wic.2.1358697849259; Sun, 20 Jan 2013 08:04:09 -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 bw9sm12874953wib.5.2013.01.20.08.04.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 20 Jan 2013 08:04:08 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net, Arnout Vandecappelle Date: Sun, 20 Jan 2013 17:03:51 +0100 Message-Id: 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 7/7] 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" --- 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)