From patchwork Wed Jan 8 15:57:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amy Fong X-Patchwork-Id: 3999 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 08 Jan 2025 21:32:09 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-oo1-f64.google.com (mail-oo1-f64.google.com [209.85.161.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 508KW7ZJ023490 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Jan 2025 21:32:08 +0100 Received: by mail-oo1-f64.google.com with SMTP id 006d021491bc7-5f33beef685sf165529eaf.0 for ; Wed, 08 Jan 2025 12:32:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736368321; cv=pass; d=google.com; s=arc-20240605; b=RZw9BakrQTWlvHFt5dAq2CNHp0PcYGJeVwNwjsiyd76SCivyg9dJC2CLl8XNOcGRwP IGCybLT5V4m5oNnd//507u3NP0i9y+5vOz43JMpt+DR8kIL+UpmQb77aZDtCz4XKGg+j 8CZowXQUqpuDAldbUoHiiIC8SXpwf4rxsWGU8bqepEL5d3NjycnwQp9764lDyigXFtx8 xjxLzRQ2MweT/2p7CvDpVQkNQ8u9mSZyOMvrD1ikNt85lAL0CJRgYBzFC56jfVTgf7KI ro4GUS8mo9zKRh7oXQZD3inREwOqXX4R13heHDjx4Qo/molfPYYiGnvs4x13b3P4L0x5 4B0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature :dkim-signature; bh=ln/IRc43s3mVCCWocVdhi8yc4C9lddJCJlN5v+iqkWE=; fh=Wv8qN0eL2tr/jPK4PmeNwr9o6IWvNYZ4M3mcZHaDrz8=; b=JTlBHHuUO3ldwCmDk+F6Pv0aLHjqSTDfRQEMcAE43emmlGDC2oWdk/ky8Y6eFNSEFw HBxAD4GUarqWXyR/BVkiD4RCrclBrbsvQgyOX7IUa8FsLadMytHefXVhWnqdpWvJHaPH keYfastM7CnseGYcMpAN5Qyw9aTdd3KHaCgiFX0rf9b7P79QuaRjUJrPcH2RPffG0Gs7 NCArh/l3ZIvL/P3hTqFWsHdyL+6X7iIEJCRYd3Pi2PEj+kmfvzxR7L3d887fNJ3umqO4 WnCt5VzQKgva9ey4io0N61j8YZcLh7qd1k+4lZFk4sl++GMjP9biTE9hw5aOrPEHK3St bXaQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NG8tenEV; spf=pass (google.com: domain of amy.fong.3142@gmail.com designates 2607:f8b0:4864:20::136 as permitted sender) smtp.mailfrom=amy.fong.3142@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1736368321; x=1736973121; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=ln/IRc43s3mVCCWocVdhi8yc4C9lddJCJlN5v+iqkWE=; b=aaEKkZkW/m7MCOGnxIpa8VU1qi+UFhelAj7HqP+gCN7Af+R/uZZBkQZqgZ6dhPevcL HOHS0lgJyZfDrjVV9E8wyCSyXxoCT0/QoGMKRZaVa+F87uAlGR3dFkZvf4l1SJ5Jhqk6 oJ1lNjfSjc47vHuZ09YJkjVUyVZGN8si8EizQM99bj4B8HONKjUa2DQqxn/qmVAyip7y Ner+THTICUw9LAFtCiJdT4E0WSEZgFHG/Zdu23ZQlGhkAvVslHSjEKkeqXV7846oe19e oZWd+byIyKQ7iRh3jm7zgN7K3Bw17S9nF88LmjtWKEbm47j6cpOrhdpq5DhFFSSGoj8e rdwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736368321; x=1736973121; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ln/IRc43s3mVCCWocVdhi8yc4C9lddJCJlN5v+iqkWE=; b=hxBD6/bn9qcEaaXArbjYrn/vvH2cyAnQ3a3nWfeYMsAr8thhJp0x83ugb7hbUam+Rk ZNs2kBR2+XzZJJnBVQ8m7YdCXDlTop9u2o201hELNCNr0v5vaM4RS4lTSvcz3gFNe/gN GWyvAjiuv5dRw39J0pxryCYNCxjMve3bmvKZ3HSX4oUA7f+33Y11y46OC6oSpOI0PI2k CG1UNMkUGNcmIL9+9QFqi2IyuneMwumuErGljDrgAitG1Y5pe3f8foN0ycjOdPnE1KKT YZWxuXRIyB0MrgQHvC7XdApRr7WRBnqRnsr73QNlp7x7rETt3Ob/XEiYoS0gPuqoipuN RBtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736368321; x=1736973121; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=ln/IRc43s3mVCCWocVdhi8yc4C9lddJCJlN5v+iqkWE=; b=M22HzsIrOfTJwRjQout8WH1Kpdn7tcBth2SfgVTSTq64MI2wTcbfCqMT4O+QHNDeax mDJ0DU+li4fsXVAFjwr+4BFEEoz1KVde+HBPP1rTZ7fOPs0iQDYTi7YQkXqOJ6lr8BJY m8j8vmlVXEK9mVt+wM2KbMrIJgqjZtEct/niCqq3VlaeTWowrLdO5RfIIxTzPPbbutP6 s9mYEpVznH2+LHKdN//5RHreGzjxab9vAvoGPL029j4jV8tnaK/W0r1l2kg5UJGLpK8R jpz1ahJQMk339t6WUJaNHoyznqd5IQNI19GhvHsA6usRyR4rYihfpZ9LAXZp6Jf3ey3h K++A== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVz3bG0fuqe+2G9yqoKLsTrRqXhinQl9/DVJBfGe0X5ZoiQ9stX+s4nGXYcqrhu2nfr9vPHKE8=@isar-build.org X-Gm-Message-State: AOJu0Yz98+pg6E9IDOjYICczFfX25a2eIOFKyUDZzDtrX6fBUNxwekmY xVTzW7yRQBu6d4Hgdrm/a06pBN6ZYbBM3vtjg5VvcPGXxT8vsP6D X-Google-Smtp-Source: AGHT+IG9iJvGrQiToKsvLBr/iZ9zTpr8FADlm0ei9jBG4ybpCqIPB46wFus+wmdid0hXIE5UMXy+tQ== X-Received: by 2002:a05:6820:4b05:b0:5ee:db2e:9f76 with SMTP id 006d021491bc7-5f730714472mr1983629eaf.0.1736368321102; Wed, 08 Jan 2025 12:32:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a4a:d0b7:0:b0:5f2:c466:6c54 with SMTP id 006d021491bc7-5f88055ba37ls85223eaf.0.-pod-prod-01-us; Wed, 08 Jan 2025 12:32:00 -0800 (PST) X-Received: by 2002:a05:6808:130f:b0:3e7:b2b4:ee7a with SMTP id 5614622812f47-3ef2edd334bmr2622274b6e.26.1736368320524; Wed, 08 Jan 2025 12:32:00 -0800 (PST) Received: by 2002:a05:6808:2908:b0:3eb:31af:367e with SMTP id 5614622812f47-3ef2e309d33msb6e; Wed, 8 Jan 2025 07:58:03 -0800 (PST) X-Received: by 2002:a05:6808:3c8d:b0:3eb:6bf8:800a with SMTP id 5614622812f47-3ef2ec432c2mr1824986b6e.3.1736351883324; Wed, 08 Jan 2025 07:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736351883; cv=none; d=google.com; s=arc-20240605; b=eTdBcCxpj9b+hKdcJpcKxC8CptOyC0KMiPKxujQrTN6kignYSx7jNJlF5JeKum0uvl VU50gJvhDnyaBJRD/+ET9TS8jvYol2waZtsumQC0XyxIB/1sdHWsTT1I1/4RpX26DPlp zaaqO0yxjzuyoPiFF0l5RhkPg7uYRXxCcIYBqKDZs5XoUHXTC6O+PTy2qHrDKe9tNT4B 9AYBThLXShnjMy0LTGB6yuF1BEpAJFz4FNlFGyN1FVdfBxveDlXybqe6a5//eZDxAZ+p QFXpq265iPd+h7Eh57vcM8cpIaC23DQ0dN11JIC/BfKh5No1ltb2HH8aUsg6hv6Kh0Zn xgAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=VBG1BVR+O6SugMQ2L3/5gkc0YRgi63+MXWAcdzkN6bM=; fh=6eKlLgnlKQ4ILN0acbSKKd4RVnzWmr/MVaRMEap718s=; b=CTiiCJZ6s+e8oyPy78j6gmul8eCcXihA0E18d+LUoRf6R+EOSTZENjeDOEW3skmrwa QppVvgNImsRusD7xZbNiHiNJisPAdXwoYgiwrge4qCFExV1ekzF1MVBVoIo2BInQGxW0 XekkSCmbXWd+iyXdcVf72bjZb8bJ83rDrvNH5PKFSSs7fpE7wjmsC3gNyVklnQbd5w4G syzUoEKtgtrxmLTbHptH3BkCJotY9BonHZQvk4rvxDNi9+4t3HFybhzoMuVQxfoYjEEL g/Qk4PyoIdIXyD8rRg0robVNOSBNO0Wuv0maVMjyMYFL9gzT1j83fix5wzsL435g29A+ CTVg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NG8tenEV; spf=pass (google.com: domain of amy.fong.3142@gmail.com designates 2607:f8b0:4864:20::136 as permitted sender) smtp.mailfrom=amy.fong.3142@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.com Received: from mail-il1-x136.google.com (mail-il1-x136.google.com. [2607:f8b0:4864:20::136]) by gmr-mx.google.com with ESMTPS id 5614622812f47-3ece2171134si1555773b6e.0.2025.01.08.07.58.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jan 2025 07:58:03 -0800 (PST) Received-SPF: pass (google.com: domain of amy.fong.3142@gmail.com designates 2607:f8b0:4864:20::136 as permitted sender) client-ip=2607:f8b0:4864:20::136; Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-3c6b0be237cso127819915ab.2 for ; Wed, 08 Jan 2025 07:58:03 -0800 (PST) X-Gm-Gg: ASbGncsH+4U4Ww7YiRW/8omY3jWWn+LOUtxyH2B6awBqbGwLsKxW4IJlVxDsM6Z13Ru tZk9Pch5UDc2pXplI39IiVgxHtd2JBSnuyHRa6ALFE9nSgdkHH+e4RdzeqRsqH84fxpt8GH5+oS +232BoLtTheBz3E+VGNoOOOFHi3STX6+2ib4I5kRPr1Dfy8gZga16B2jgtLlrLl7bEvIQeVITrw EX0iTal36yoCQ4QsfPL9jeHgtn5fd6G+7KzgnLZUvKCrWP6Gw5GGucHh+6kbw110JA4DcMPUYHM ltQtV3ZWGowRDYNSKaZs1wjeMzqnzd60Vp94 X-Received: by 2002:a05:6e02:b44:b0:3a7:15aa:3fcc with SMTP id e9e14a558f8ab-3ce3a86a440mr32566295ab.1.1736351882716; Wed, 08 Jan 2025 07:58:02 -0800 (PST) Received: from cat.. (198-84-204-84.cpe.teksavvy.com. [198.84.204.84]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3c0e47d6cdcsm108196255ab.71.2025.01.08.07.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 07:58:02 -0800 (PST) From: Amy Fong To: isar-users@googlegroups.com Cc: Amy Fong Subject: [PATCH 2/2] error directory creation Date: Wed, 8 Jan 2025 10:57:04 -0500 Message-Id: <20250108155703.10376-2-amy.fong.3142@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250108155703.10376-1-amy.fong.3142@gmail.com> References: <20250108155703.10376-1-amy.fong.3142@gmail.com> MIME-Version: 1.0 X-Original-Sender: amy.fong.3142@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NG8tenEV; spf=pass (google.com: domain of amy.fong.3142@gmail.com designates 2607:f8b0:4864:20::136 as permitted sender) smtp.mailfrom=amy.fong.3142@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=pass header.i=@googlegroups.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Amy Fong On a build, create a directory that gets populated with temp directories of recipes that fail to build. The variable ERROR_DIR defines this directory, defaults to ${TOPDIR}/errorLogs Signed-off-by: Amy Fong --- bitbake/lib/bb/build.py | 10 ++++++++++ bitbake/lib/bb/runqueue.py | 6 ++++++ meta/conf/bitbake.conf | 2 ++ 3 files changed, 18 insertions(+) diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 44d08f5c..1c8ad032 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -25,6 +25,7 @@ import bb import bb.msg import bb.process import bb.progress +import shutil from io import StringIO from bb import data, event, utils @@ -103,6 +104,15 @@ class TaskFailed(TaskBase): def __init__(self, task, fn, logfile, metadata, errprinted = False): self.errprinted = errprinted super(TaskFailed, self).__init__(task, fn, logfile, metadata) + d = metadata + errorDir = d.getVar('ERROR_DIR') + if errorDir is not None: + pkg = d.getVar("PF") + newtmp = os.path.join(errorDir, pkg) + if os.path.exists(newtmp): + shutil.rmtree(newtmp) + tempdir = d.getVar('T') + shutil.copytree(tempdir, newtmp) class TaskFailedSilent(TaskBase): """Task execution failed (silently)""" diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index bc7e1817..a77749c3 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -25,6 +25,7 @@ from multiprocessing import Process import shlex import pprint import time +import shutil bblogger = logging.getLogger("BitBake") logger = logging.getLogger("BitBake.RunQueue") @@ -1334,6 +1335,11 @@ class RunQueue: self.rqexe = None self.worker = {} self.fakeworker = {} + errorDir = self.cfgData.getVar('ERROR_DIR') + if errorDir is not None: + if os.path.exists(errorDir): + shutil.rmtree(errorDir) + os.mkdir(errorDir) @staticmethod def send_pickled_data(worker, data, name): diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index ef408faa..f345b9cb 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -200,3 +200,5 @@ PATCHRESOLVE ?= "noop" PREFERRED_PROVIDER_bootstrap-host ??= "isar-mmdebstrap-host" PREFERRED_PROVIDER_bootstrap-target ??= "isar-mmdebstrap-target" + +ERROR_DIR ?= "${TOPDIR}/errorLogs"