From patchwork Tue Aug 6 12:59:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Ferreira X-Patchwork-Id: 47379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94961C49EA1 for ; Tue, 6 Aug 2024 13:00:10 +0000 (UTC) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.78]) by mx.groups.io with SMTP id smtpd.web11.6628.1722949207745802626 for ; Tue, 06 Aug 2024 06:00:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@criticaltechworks.com header.s=selector1 header.b=arMv+sPN; spf=pass (domain: criticaltechworks.com, ip: 40.107.22.78, mailfrom: pedro.silva.ferreira@criticaltechworks.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=D5YQUpo0g/MOzwSDVmNYIFoemTyUF3TQDfFsHHBvMUZyrqOIy+SA3haSHyILaUmF9dGjRoj95agYJ4vCBmsqLiP0/kMJBjobaCeZmlyNbLjb3uTSM8mmiDa7bUmu1hs/c2ovWDgM9J78i3M+cN28bzA1sys0f4JUXmRZZzd2jiNcEBEW6SY0ix2C7Q2NKtTj6ovc1iudhU7FpBagPqg3lbg/nCPexU+046LC1NmqJ2HaE07gQdZxapeZw7cWvAOwvNekqrn7zzK14lLsKpIj3lXVG9mZBSieYJbyZsTFMxAN01iyY/TlY3F+CLnkbVAyTDjW2YDxZvOeBzC3fQBLxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wxdEJEjX+ZoGwpfSOjcJ/jb36j8jjpPQ304ta626Kew=; b=AZd0yC2Sw2NeYtQhOkUIycMyKc5m/Z5Hv/YtsemD6r1Kc2kUq5XOhP7BJrzo3UzWBmLT1cA0qRLdfkSrZgMG894vSdtqeDjsVB9fs83wdWSIEAtPNFHM4Y/IP9P9PmGK93fIdG7FzwA5aHr2hiiouP9PkP4iEdYU6vekl4T//CSRUZkGtzVmcF5e9D2ZGm5+556ZefWlMMwlSayeoP9R3xkXb9eaiH5axiXk0D6HsWEbi5gN4GSbxvrBj0jDytTKgmWYwpqMKJa7C5xjDyM9zOrvP4Q0bAKczxMluCsIyEGLbBfd1Z5I9oozhEfuirq3rKcTRuKumLpDf925vDvqZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=criticaltechworks.com; dmarc=pass action=none header.from=criticaltechworks.com; dkim=pass header.d=criticaltechworks.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=criticaltechworks.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wxdEJEjX+ZoGwpfSOjcJ/jb36j8jjpPQ304ta626Kew=; b=arMv+sPNX5GQjc5iQgFElGnZ7z0UQldehz8ifQa0SLveHp/9Hh1c2IfcX6UbrP0aMLCXi3yMbeSTErkGk4LcBA0XguPMdXGx+W5pebdVu0hab6XhMD7bsnm8mbmvUT0w5viqUIOX3bDTZoHo0DilPUZ5Q0nRNGMlzkKuKI4bYnEy8YCHxIwsd1dghSWQLcRBn2ZM5gsEUJbLQyBZeYP1fZXfV4cUSone7EjDkO9tUNn13+6Fgsf0QKXNFUPYNSx9W7DkUrbUXOCjBB0InD5tH+g1gSnQItqdk3wBdFpYMubC/7Pm3q0DTSkpnIzAweWJUvrxjkVERkCMpcInsQXppg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=criticaltechworks.com; Received: from AM8P193MB0900.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:1ed::9) by VI1P193MB0557.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:151::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Tue, 6 Aug 2024 13:00:03 +0000 Received: from AM8P193MB0900.EURP193.PROD.OUTLOOK.COM ([fe80::c359:f497:ed59:65a1]) by AM8P193MB0900.EURP193.PROD.OUTLOOK.COM ([fe80::c359:f497:ed59:65a1%7]) with mapi id 15.20.7828.023; Tue, 6 Aug 2024 13:00:03 +0000 From: Pedro Ferreira To: openembedded-core@lists.openembedded.org Cc: Pedro Ferreira , Pedro Silva Ferreira Subject: [PATCH v2 1/2] buildhistory: fix package output folder creation Date: Tue, 6 Aug 2024 13:59:54 +0100 Message-Id: <20240806125955.160835-1-pedro.silva.ferreira@criticaltechworks.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: LO2P265CA0229.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:b::25) To AM8P193MB0900.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:1ed::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM8P193MB0900:EE_|VI1P193MB0557:EE_ X-MS-Office365-Filtering-Correlation-Id: c7712e21-9be6-42bf-3fcc-08dcb617b010 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: gcK+cQGhSna1IRTzHFMb5G+D43CpJaBIYNLpyzqwaTfx1Uz9LGJZHQIBdixrC0wPSV6QSDN7ShZ9DDGQJraFyujjvhruNhXgckOs6fWPd2ucXBD0QNNHxn76AoX5bK37he93NxLxYZM2VGf+etD8aV7mUQBGEuVX8hsCgQJY2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73KMM4TAvgoe7OK6FgD47Zq7hl8NYzRmzCNiBBQJWEAwfife61XdB/hdwEZhMa+QF7zs3ZjJpNTR4aFcMtyCrWa4xL4x4xffEb8dbw+sqmRHvX4cqtmYDR81iG3fs6MU2XasN6l59zkaPQOV/UsL/4jIBzr3s7ufk+0IlFQCVQN8LDjtmGYw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8P193MB0900.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GTNeXIUPTPB8cTepqXyV8pRE5kvQ9zzTUcXbGik91Y/mcWw2JdtaD9mFaLOcGjqmuFVSyounO3/8jCExMqNczNU9IicViVIBn+31zQpttC9PQW7UTmOIBMSqjO0q8YnNxlNcbkdYASBQswopaqi1hO/44Ho0GRqzfDO7SsGO08D45BXatRL3BxEIJL/uyV9JBClNAO0kBkH2oKrda0RPseZ09ntJ/jKAQHAdtF1wXphQTNUH9/PdnwJ2qfoFUpmDwq4vQpFyMaJoXKg8cpP3RHOzolXvg6Y1Odb0a0tX6vCIrZY6hmyuvHpA8gaalFzJSFMd6UphRi8lbyBkyLN0K+PHITz5VXY08O9cGdegYBYuO1OD3u9zjpmfO0pLDk5WKuEZ8F7nuxGK9uMT1m8ROkqY/1TkAyc2994hCP08BsPal53gOmfFmPXaH6T2RTwWadm4L6hSamTFjfu00URT4sejWb1T3e56WUFnNJRjlmihOy3DckSrIstvYG1888SJXpsK/vxrLZgxLMvgBY/WA5WToGeAB8aOFEjuQIfT7TGzx9ESKUrYG252bZNcyvl2LOBU0EwaQ89QkAUqBG3nwXKAsfeSLSfZ1wOEoC0f6TZIf9ylkI037N7+UJ+FI18UbEh3m4cr+JMxImJpskAEP/5sop14ULniYDIVqanwaZOn5ykLntag224aEAwOZIWOYH9APgicF4Mm3dme9K2WdeE11zyZ7DZ7FS8fHR9ow4kkIFSjITdzvPtTy80eZFJEuUh8fJqaRE4KZ/m+1EOPdSv16SmhWcHhcr9/0cR8Ep7yWwXikWAl0C9EaCGiqgCZtui3rjclAHQ9ou2Bb9bVBcxo0jHPIJgygH8dxwkKU9qR0b/szVXiBLhm1YJJls6zkSUBUq0CQXvP4al5I5bZwRe4YPuCduCcWrLBilHX/0ixu/N6hMiLzMFteRJtoRNgRj+OaYw2mw5X9mf2Ykz/4nKrZxETh1+c77pUmtwYRSn5lZ8gwQM2h4w/AyKxRsgDrYanBehxI9OJgjtOJ5LsfPwFJHUcOOXyieqHcJCBPAiouCthPfnXdHcc1pof5luyvtZfndpxQJWUu15JtQ9Lch+tiANUf1od6qybZPCJ0X92CKIlSe+SGSCG57O5fREy3diImKZNOjZNH6c7cqqx+pK8C2ashkL24w53A2xN1uSGLhE73j5bNXOd048J0veXIlSaeH81ZsROdQuGoyU5gzPrvqqhw1uum/lVj5BmTILTRPTQCJjNupphCFREygzRN7XLuJMRY0ZnQYY0iIFdW0nJ6vcVF52KvHJQTJL83GVDvNW6yAPwYVOt78x+44JG6nExyTviJERZQIoCZhkPl17RLfY4eHUzPYwMYj95zgV/0zG5Dh0R5gI1FEgYUOXLi6kihaJK4CDGkoVNgAqe9B8bbMHJ7ES8Zi6HgBU0f1bPycrWkeeTl5vOmCV3jMZN6Z9aiLrSzOKkYSAGw2Z4wd5KSpu8IPKKgycsurnytkKGU4pA+GD1h4CAtycuK+1iwUUYkGSpdKwBhyUqLvCUzQulo4dGPVzUVIhB1L2UiEnkEIj1yCXGPCdTSXCyaDV6UFxE6s8Nw3PDIuyncNuBFqp0pSrPG4xDEX4I57xFOxw= X-OriginatorOrg: criticaltechworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7712e21-9be6-42bf-3fcc-08dcb617b010 X-MS-Exchange-CrossTenant-AuthSource: AM8P193MB0900.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 13:00:03.5297 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 61f30b8e-4f6b-44fe-9bc2-041e3a9f7346 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aq/o+QwP6j0TUguoe6elMzammtb1yay0T4sXHBHsUf/90fNIo67yDGjU4eB2CVFnIH/kusl3GXY3loAda5OAjXPteQJg+EkpNIPH2CYLywk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1P193MB0557 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 06 Aug 2024 13:00:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203019 This fix garantees that output package folder exists on buildhistory folder to avoid missing files-in-package.txt creation during task `package` execution. This issue happens because the output folder is being created on task `packagedata` before generating `latest` file. Also it ensures that in case of `find` fails we leave with a hard error instead of hidding the error on the for loop. Signed-off-by: Pedro Silva Ferreira Signed-off-by: Pedro Ferreira --- v2 changes: Fixed Signed-off-by to the correct email --- meta/classes/buildhistory.bbclass | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.34.1 The information in this communication may contain confidential or legally privileged information. It is intended solely for the use of the individual or entity it addresses and others authorized to receive it. If you are not an intended recipient, you are hereby notified that any disclosure, copying, distribution or action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication by error, please notify us immediately by responding to this e-mail and then delete it from your system. Critical TechWorks is not liable for the proper and complete transmission of the information in this communication nor for any delay in its receipt This e-mail is environmentally friendly, just like Critical TechWorks, which lives in a paper-free atmosphere. Therefore, please consider the environment before printing it! diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index c3d049aea3..ad151092c9 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -599,15 +599,13 @@ buildhistory_list_files_no_owners() { buildhistory_list_pkg_files() { # Create individual files-in-package for each recipe's package - for pkgdir in $(find ${PKGDEST}/* -maxdepth 0 -type d); do + pkgdirlist=$(find ${PKGDEST}/* -maxdepth 0 -type d) + for pkgdir in $pkgdirlist; do pkgname=$(basename $pkgdir) outfolder="${BUILDHISTORY_DIR_PACKAGE}/$pkgname" outfile="$outfolder/files-in-package.txt" # Make sure the output folder exists so we can create the file - if [ ! -d $outfolder ] ; then - bbdebug 2 "Folder $outfolder does not exist, file $outfile not created" - continue - fi + mkdir -p $outfolder buildhistory_list_files $pkgdir $outfile fakeroot done } From patchwork Tue Aug 6 12:59:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Ferreira X-Patchwork-Id: 47380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8168EC3DA64 for ; Tue, 6 Aug 2024 13:00:10 +0000 (UTC) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (EUR02-DB5-obe.outbound.protection.outlook.com [40.107.249.73]) by mx.groups.io with SMTP id smtpd.web11.6627.1722949207556365127 for ; Tue, 06 Aug 2024 06:00:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@criticaltechworks.com header.s=selector1 header.b=al451KZn; spf=pass (domain: criticaltechworks.com, ip: 40.107.249.73, mailfrom: pedro.silva.ferreira@criticaltechworks.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KmyObjzMR698M2nG31gOHAqpGfdt8+Rf3fwl837SfjMBeXFe5X55nqgkhaMuTXcy+5DX2xfY835xCflSK2dSMYug5EZLg8+4nQ6TL82xw+y2ElG3kFI6mX/G2i9HsZygGAJisMWLGCbnSVKhHPQKi84lHHrWu5Z30vMTQQPBSp0aQVfrjCy1OVzKPHNTCqlcTIZfPq4cmPerrLGnASAWKRcLZJWaZxOnR9mt9pCNupX2YCXZWZN+frlmy36AmMka/neGIhvtXVO+ICpJacooltjvvvgaj3QRCWj7zJ/d3Abi5W9MhykGiyGL0ro6EMP7ZoymSyJQLGpHhFiJ0zrPTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vEkK35PCRzJa20LimeOOd3GLIiMZbvc3HMyb6emCzhk=; b=HT2WvBWCoSdAvjpZrDfoGTcmSvpqfd4ELE9uDx/vHqqIp1w/9IVYBuls1uvba9V+xh+3xMngDluMkS3pxosRB4epm9pcVf57qM6Joap6Yuy3LjLfCtHF8PI7HH8yRmDsB8PD4z8iAtEi8Ct0egm35Nrx5QA2m3LyB+54aCgDQ2G0C+orVZVHoUWCjUfce6ViKbqXTW9ru4+em45HZ5855TLgh3Ii412uHkIwp5uotOxa5xk/rusGK+8ltJl9eigmt38Xf7UUD1eCEsTe5EMrXXbT7kw4LLTNwYqVVY+PKaIy+xsvQ4G4u/u3IaWYd21yAzQ+NCXCaD01kz5MSJgC/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=criticaltechworks.com; dmarc=pass action=none header.from=criticaltechworks.com; dkim=pass header.d=criticaltechworks.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=criticaltechworks.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vEkK35PCRzJa20LimeOOd3GLIiMZbvc3HMyb6emCzhk=; b=al451KZn6y5djwQtMhYl5c2WQz7rTkAdD2iuMsP/UoZrHndpWfuzrZuIqiH+B/RTorqhjjmAxA27LJwZSYDy3RdTeC6BH878oneVRaimMt1jLo9JbFVtypZ9mjlKp0rV6gdQ6A/0tN++gx0m8EyaQdXkzJDqvZXWS5zRBYaoETmpqf3UfLMXk8q2n2sJ0zGNAOvX28CQb0W3j3a5QJEbEs3EPh1J6NO7kWBnF1DWmRSE5qLaJyo5tzNYm0OVe7AHltoQXpTFf2OT2lBzQ1RnCSEIo/uOYX3DtqGobqd+yJxOBY0HUKxJFToeilMKViVYKINgbvVCp/b+Af6XHJ9P3A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=criticaltechworks.com; Received: from AM8P193MB0900.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:1ed::9) by AM0P193MB0532.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:169::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.27; Tue, 6 Aug 2024 13:00:04 +0000 Received: from AM8P193MB0900.EURP193.PROD.OUTLOOK.COM ([fe80::c359:f497:ed59:65a1]) by AM8P193MB0900.EURP193.PROD.OUTLOOK.COM ([fe80::c359:f497:ed59:65a1%7]) with mapi id 15.20.7828.023; Tue, 6 Aug 2024 13:00:04 +0000 From: Pedro Ferreira To: openembedded-core@lists.openembedded.org Cc: Pedro Ferreira , Pedro Ferreira Subject: [PATCH v2 2/2] buildhistory: Restoring files from preserve list Date: Tue, 6 Aug 2024 13:59:55 +0100 Message-Id: <20240806125955.160835-2-pedro.silva.ferreira@criticaltechworks.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240806125955.160835-1-pedro.silva.ferreira@criticaltechworks.com> References: <20240806125955.160835-1-pedro.silva.ferreira@criticaltechworks.com> X-ClientProxiedBy: LO2P265CA0229.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:b::25) To AM8P193MB0900.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:1ed::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM8P193MB0900:EE_|AM0P193MB0532:EE_ X-MS-Office365-Filtering-Correlation-Id: f140bf36-390b-4254-812d-08dcb617b058 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 9ksnQa6z/dQXVV5iwD0lfWYuCOdi+5Kol6aLtUbkVDbdB3ciQllpXoTUqFERN0UxjWWSGClKMN9+4+pwxsz3VqtQtQHXP9Ou00I/2P/VJ3tRp4XCvld/6fH9WGneGMqaC8FQZLsJogvDMFad8CTGOcrtXOic+apW/aBk2w3vD4SUdDf/vdgx4T2R+TzWIW8ArNjfx23Iwva5yk26+rUlTGZNDfu5i9JyIH/ol++Z0tIFVwMjW5x+huMcJrFLJckOO6MXlmsfQ4vk6b+75j/NW4nlveTdUXGbQbsKcB1H6ZxaGC7wuAsVYM/QfoMTltl95hP+vS5KUT2gTgK7uzRN5xvd+h1weLlgRfAnZzJDEZt6at2kuUn2HuGappQ8B1AqlKonkg5Jd6r14sA+VmMqL1NsLeE9Qw/kyAwlGx4y1tlNLn8wIIPzLJRpPSln52jJVImkcvC/6Vl2NYHzok7QWngXDfSSX9gjI/OIOlOJmsSz8Ik5PoIhiTlKfVuoqJ694JDQW8HeFWFWV7Qe92V7DS+g4RDrczvI16QeYFV1PpTtcDHdFBtjY9pxXD+7AvgDrrsjE7k43sDm8wOh3dP4a8H1oGYe67qmYDWUPsACJsPhT4HBFC/kl/CmQ5xH3DfOGfZiYbUkKEQro0TjxdxoMGjOGsAQsngjgpScrCXjHIjSbW0gQ95YcAJOL3CPs9XGBI6l4GSiK61rkQkyj8rPhWyqUzUPQ+fZdkCMvcTP/c19u4XugqGTtCufuNKUpeb8NUDVU5EjpCODl1SOkvOLd7nNZciYp122Z0J7MTUqz8oiCwtIAe5WqcEwgFifSpHd5C0VuPFQj+wm1qh3dV8WY0f+tcnQ09rVn/dAVuyIbRuVfQtvQP6x9UprVd6T5jdPDjBi/KGEDM5U6HPV6N/AXRyUWLudv+xuAyHPtWk9O0RmovIILdcRslNQA+afmhqvW3GHNqOs+8KOVz4lbYhSYFBczVgN4+hNaAxzYThfB8qF2qKropoUzWpiBA3+3viELJk6AajsoxkhyHJSS4CiNcMadTJC5rs1Cw51vbf/RyiYG8u8JFYmVLO50kRifYmL77YUFz6V/po5RHvW16psb5T1pOlTKEWD3zag3cuf0lvfMUpkJNAdITnm6haz+F4QsuAI0JhjcM2XIOsgwNOTAQI4E+eeScC4jKL7cvcJzIqx7THGxBz5lBfSt7uhNdp1yKYAHQqNWSQAKuao0cwkzQ98WAKQNaSDDxt56mP946Vdi4Htcw8YU/1W2Vwxqu7M8QJmh2ziYgDcW9tCF1zUh53d+KXFFSk4OZNZdOKewBhIKxc8txZ3hfojxo57TO93hoLE9mH+NyQ4A3dDY7jfUwLu2ZQeFyCHcV3/3hH4Ubf+7F3l/76fXTzg0NKJBCVpoe/fwsxQA3QlDeM2T1uIJg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8P193MB0900.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BQlrqFx0PeomSDwT6OO73YhYGDGVUvOGhbxcDW7LHLgLa6ArewoFnUfIh2WGV0K2veeo8kOYflu/nPJWTT9JN4X6ZuUf0+4qbkoBEGi/24qdofDvXCUVlDt0kUqMEtAhAQBxtq2SsoYnSIZkhjUvIv0b+ofMmBnTJ+IY090OJsQTwf8m+W09BfH+2cQsbDyW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m0GO0sPlKLyS/QrO1L7NjUzp8CxHy9oCf/J4/3Xe5GhFHAB700S85B4obAD9hqi7yBX0XzcQJq6NI3nOZ8LN4H5hFinVjGCM092o0njDS+BJht9xO0bFGxnCXvWXmN6UuxMyKOp8E35TzTtJ5ADV3O1PlqRNN1lPYICKHEXTuUxOh6Ohy16xYH4NtyMr1z4R6oloJqWPc1ARw9NW7a6E9l9AtKgQtaoUo+NzIGxmt0HlxyemcffZhJhXT7Obkh8z9Dz0GDgmuV/Orv7nDFg23E9F5FFmA4zas4tKCv36fwk7Ege7oebNWpE/dsd+uayuo1Zp5YjOHYp4yzvqJEuTlBKc62Ccc1NsYx+9bhZq8lYu4oNxO2XIpoGjL1VOMhxpsZ0= X-OriginatorOrg: criticaltechworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: f140bf36-390b-4254-812d-08dcb617b058 X-MS-Exchange-CrossTenant-AuthSource: AM8P193MB0900.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 13:00:03.9511 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 61f30b8e-4f6b-44fe-9bc2-041e3a9f7346 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: P7s9xQlU2pygCudhZWIgyPErkDyznialB/EmWL/LUBoZ84OTjv9rNM87za/mrhpuGN2hmTHIAHLGv5kw0u4EVDLQZ1dmsw5wL0MpNEYjcqo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P193MB0532 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 06 Aug 2024 13:00:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203020 This fix will ensure that, when we activate feature `BUILDHISTORY_RESET`, files marked to keep on feature `BUILDHISTORY_PRESERVE` will indeed exist is buildhistory final path since they are moved to buildhistory/old but not restored at any point. Signed-off-by: Pedro Ferreira --- v2 changes: Fixed Signed-off-by to the correct email --- meta/classes/buildhistory.bbclass | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) -- 2.34.1 The information in this communication may contain confidential or legally privileged information. It is intended solely for the use of the individual or entity it addresses and others authorized to receive it. If you are not an intended recipient, you are hereby notified that any disclosure, copying, distribution or action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication by error, please notify us immediately by responding to this e-mail and then delete it from your system. Critical TechWorks is not liable for the proper and complete transmission of the information in this communication nor for any delay in its receipt This e-mail is environmentally friendly, just like Critical TechWorks, which lives in a paper-free atmosphere. Therefore, please consider the environment before printing it! diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index ad151092c9..349b7dfba2 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -110,6 +110,7 @@ python buildhistory_emit_pkghistory() { import json import shlex import errno + import shutil pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE') oldpkghistdir = d.getVar('BUILDHISTORY_OLD_DIR_PACKAGE') @@ -223,6 +224,20 @@ python buildhistory_emit_pkghistory() { items.sort() return ' '.join(items) + def preservebuildhistoryfiles(pkg, preserve): + if os.path.exists(os.path.join(oldpkghistdir, pkg)): + listofobjs = os.listdir(os.path.join(oldpkghistdir, pkg)) + for obj in listofobjs: + if obj not in preserve: + continue + try: + bb.utils.mkdirhier(os.path.join(pkghistdir, pkg)) + shutil.copyfile(os.path.join(oldpkghistdir, pkg, obj), os.path.join(pkghistdir, pkg, obj)) + except IOError as e: + bb.note("Unable to copy file. %s" % e) + except EnvironmentError as e: + bb.note("Unable to copy file. %s" % e) + pn = d.getVar('PN') pe = d.getVar('PE') or "0" pv = d.getVar('PV') @@ -250,6 +265,14 @@ python buildhistory_emit_pkghistory() { if not os.path.exists(pkghistdir): bb.utils.mkdirhier(pkghistdir) else: + # We need to make sure that all files kept in + # buildhistory/old are restored successfully + # otherwise next block of code wont have files to + # check and purge + if d.getVar("BUILDHISTORY_RESET"): + for pkg in packagelist: + preservebuildhistoryfiles(pkg, preserve) + # Remove files for packages that no longer exist for item in os.listdir(pkghistdir): if item not in preserve: