From patchwork Tue Sep 5 10:11:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 111646 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp2626479qge; Tue, 5 Sep 2017 03:11:36 -0700 (PDT) X-Received: by 10.98.141.218 with SMTP id p87mr3203638pfk.256.1504606296192; Tue, 05 Sep 2017 03:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504606296; cv=none; d=google.com; s=arc-20160816; b=kygPUq3co1QgyWGI9zwRTIhomPecbtUkzC+brbNO2tjmNBa0YHikbur8DKbeqNhmx7 f2DyKH3yJVJXwKwzNjpTLqCGkmSkK0oNY3c2Z5yeFF2JtvJhV0jDjc5K9QHGrb4/FfON Cbv/VPcn67y/GZjN1VnBOj5u+86OewIfApYja+IlxoJMidOU2B0lzqj7wEIyoGYTzVfT jTLNAOqZJZk7/YdJ4pQtTslWHJLy/P1u6RDNQ8ACzC00GpK2+5pXuQBYBBb75yrRb5EK fbVq1hb3RhtC3IGPox8CVvXlUIZlaK4xP+nsY1mQ3SWYTp8bys0KJt4MGV9JIR/3twiZ s5Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=mBxcaxc0mm3ieLD/6eSctbObe/Sf/74YhNt4a7vhWw8=; b=tgNp3l4Na1DYSoWe76Jt6tMKUFb15BSw5WByp2OHYbwYqNy85rgsQeo2uFPqOvFctW pFR/l9IuN4O52HefOykD9hsvnnhy/9OK0IYHC9wA874iWzZLshmRI/F1FstdiAyijBZI npDw6MkeOI9qd/v91JfDmAfPRO05uXao8oqfCUoEcjT+46gr2w9hr3Tggep0gWb/8KeS m+9YH/DIc/B0Cx+AgVlCuK6byuQ4w8B7B9K1Wdue7mQEySN7gp/eNUtfbCh3wnGagLj2 IFYfijuBXKw6VIe3u8kj80ysCZHufj7l/HY2wE4hI5JOB7aHhN+DxNU7WBQ2ydY/b/Qw CtAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=W65ENsa1; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 5si93823plc.562.2017.09.05.03.11.35; Tue, 05 Sep 2017 03:11:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=W65ENsa1; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 2788E7805C; Tue, 5 Sep 2017 10:11:32 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mail.openembedded.org (Postfix) with ESMTP id 68B17601A5 for ; Tue, 5 Sep 2017 10:11:29 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id i145so16937198wmf.1 for ; Tue, 05 Sep 2017 03:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=mbtVfYcBhFsb/uxuM85O+QnDvVrfGGSYF8YEu+nzL44=; b=W65ENsa1ZWQargqtM1jQYdhGhQcf2QoE+v02Z2EoMTtGTdOETRhrshnbftv8+CTQWb FTpLmmRqd79LIvbE1GA9APWwmkHNQp7UPvdxSQByc0055E4gyvs6Uuu9hK7+YnSd1gGf 0igm0bCJynV0mnNNsa1DIppvOai/tJJiAWYoGRFU/3FPXt6bER3d1KW1frm0DlLqxwHf mPDIpPJcSIOKDICu0OkhsFW1+Zg+bYqjN34CFB6mLsuXJVXPHcBA3wUbsOxdNh/FtLhN 7NqBXtZ4hflvIC6Z1nVw1JHcjM+36xdOqTVdS9qel5WMMPMh9oI5SkdIFHNN0x5rK3qZ ZMKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=mbtVfYcBhFsb/uxuM85O+QnDvVrfGGSYF8YEu+nzL44=; b=ZgWpYMaL2pkzY9vSsUSbtaiGBFWftfH6vEcl1+fZGipqnQWme9abVTLGvLVcCSSWD8 iKETI6vFe7v+jAqOH0Ggu8Sr9A9VCSOvXD7jRvz+2BaIRLcGHeLSLe8KVR4CWbO4YVuL x4qyFVW1243L0tx4HwfNSIzcXML0ZBeXzSWIeTCsDnpneDgHjJUn/LdlS2xakOoCuyKz vYRJga+piUVHM5kdrhpg96w7/TKHXpsvQq0qGpK5urUi/N8FyMoO+pvwVcWG9jda1xDl YHkNHar0XMIqjKqpgT/5BV4fBbqaTijCJFC7UDq9TfqOtE58jcUru+xOqGYD8+DPt8gu EwCA== X-Gm-Message-State: AHPjjUjp6LwyyXPKgg2trvCzXBKH4HzA83fZj0D0MC9xF9YZ/GcFyOkd HEZin3la4IQk7HEvl2c= X-Google-Smtp-Source: ADKCNb4QnoDK15LuksOeqweBRFpnfLXt2nighDtT+JfexafmgHqv8hHlEcAyxn+uYxoRk9C1IhFUMQ== X-Received: by 10.28.63.204 with SMTP id m195mr2439885wma.175.1504606290497; Tue, 05 Sep 2017 03:11:30 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id o22sm193422wrc.65.2017.09.05.03.11.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Sep 2017 03:11:29 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Tue, 5 Sep 2017 11:11:27 +0100 Message-Id: <20170905101127.4810-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] rootfs: improve postinst intercept logging X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Ensure we capture stderr, always write the output to the log, and don't be so emotional in the warning message. Signed-off-by: Ross Burton --- meta/lib/oe/rootfs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 96591f370e6..9d4727e76c1 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -302,10 +302,11 @@ class Rootfs(object, metaclass=ABCMeta): bb.note("> Executing %s intercept ..." % script) try: - subprocess.check_output(script_full) + output = subprocess.check_output(script_full, stderr=subprocess.STDOUT) + if output: bb.note(output.decode("utf-8")) except subprocess.CalledProcessError as e: - bb.warn("The postinstall intercept hook '%s' failed (exit code: %d)! See log for details! (Output: %s)" % - (script, e.returncode, e.output)) + bb.warn("The postinstall intercept hook '%s' failed, details in log.do_rootfs" % script) + bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8"))) with open(script_full) as intercept: registered_pkgs = None