From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.windriver.com ([147.11.1.11]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1SXDqY-0007vL-B6 for bitbake-devel@lists.openembedded.org; Wed, 23 May 2012 17:51:34 +0200 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id q4NFfNI1026259 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 23 May 2012 08:41:23 -0700 (PDT) Received: from localhost.localdomain (172.25.34.61) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.1.255.0; Wed, 23 May 2012 08:41:22 -0700 From: Mark Hatle To: Date: Wed, 23 May 2012 10:45:09 -0500 Message-ID: <1337787916-591-1-git-send-email-mark.hatle@windriver.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.25.34.61] Subject: [PATCH 1/4] build.py: Add a log to capture task execution order X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2012 15:51:34 -0000 Content-Type: text/plain The new log.task_order contains an ordered list of the tasks as they were executed in any given recipe. The format of the lines is : Signed-off-by: Mark Hatle --- lib/bb/build.py | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/lib/bb/build.py b/lib/bb/build.py index 95f1dcf..4f06b15 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -290,8 +290,22 @@ def _exec_task(fn, task, d, quieterr): bb.fatal("T variable not set, unable to build") bb.utils.mkdirhier(tempdir) - loglink = os.path.join(tempdir, 'log.{0}'.format(task)) + + # Determine the logfile to generate logbase = 'log.{0}.{1}'.format(task, os.getpid()) + + # Document the order of the tasks... + logorder = os.path.join(tempdir, 'log.task_order') + try: + logorderfile = file(logorder, 'a') + except OSError: + logger.exception("Opening log file '%s'", logorder) + pass + logorderfile.write('{0} ({1}): {2}\n'.format(task, os.getpid(), logbase)) + logorderfile.close() + + # Setup the courtesy link to the logfn + loglink = os.path.join(tempdir, 'log.{0}'.format(task)) logfn = os.path.join(tempdir, logbase) if loglink: bb.utils.remove(loglink) -- 1.7.3.4