From patchwork Fri Apr 4 12:10:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Haller X-Patchwork-Id: 60713 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 93928C36010 for ; Fri, 4 Apr 2025 12:10:53 +0000 (UTC) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (EUR02-AM0-obe.outbound.protection.outlook.com [40.107.247.81]) by mx.groups.io with SMTP id smtpd.web11.9811.1743768649466741872 for ; Fri, 04 Apr 2025 05:10:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@Philips.onmicrosoft.com header.s=selector2-Philips-onmicrosoft-com header.b=TxA0btSf; spf=pass (domain: bbl.ms.philips.com, ip: 40.107.247.81, mailfrom: jhaller@bbl.ms.philips.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rIN+1rXi59o4x5igheUjfPtvkMLbDWhm38KAjJusKmsZnmDowSIekzQfdadderUbHj1//pHeugZtOAIco6SUX/cLxKUozWXbPKLJw0uhJtvZlwaF+SbIV37LTTF/1lnGNBchHBgrE6gqPPZA8TmyddTnDiqZPr8TDJNJdZ3KkWu1tvzI0NGru+RDDfRaNFliqJ2GNRudBhNiqiFxe6SNNEOj3ncxUl0c+SGNMZVXqhya5TfB79Ae3qFdB6hZExvlVO0laABJHZJrBlEBoQcVtrkvn1pXIpAXKsphY2nQWUYuHL/6BjtY9eU+PJCfcguBGxWLzZBlMJnFai69Nz6rFg== 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=APwbMpBHqCj5wSAjSrYEzYNdD8YTLUoJ4lc9xXf9d3A=; b=smz5HgGL2gEhKviYrond934TdYx+67aAhIxl9SEDcDM4D0xds5GCYHRmywVgIT/8xU5X/sgMSTr1s0fQL+IBuRKf/80JfrKZRsf0DNgVe4qTMGTCT8ugBHV9weOJCBFhvxQuNJ8tgXoVY8gCb72/NgkmL98mqX1vCp0H8/3vfbIxz004Awg932a+T74f91tVqPK2DLXw6yC5OJe6cEa6q+f9l956w4w5r8wJBKcuo9kclroNdT54BpQ0EDsUmsdPtGn7OhI4GIO8UVau3BHyJi2lX6U8cTlTn9eiPznrRX+CMRTzUBUrwKHFLkMsCMmivsXusF0/eATME/Y06gTQMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 3.248.88.141) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=bbl.ms.philips.com; dmarc=fail (p=none sp=quarantine pct=100) action=none header.from=gmail.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Philips.onmicrosoft.com; s=selector2-Philips-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=APwbMpBHqCj5wSAjSrYEzYNdD8YTLUoJ4lc9xXf9d3A=; b=TxA0btSfwAbnOK4Dy6tSZNFdEd1xpAi9ciJ5OR6uakz3uw2F71xRsisV76n/G7Uvq22v9F9C+fQMgjxj76h7bDcQinDgKjq7Tkoog7CA4UDomiaVWfFvxYUHjm8Yx9cibVHf/cDk+JfrKr29V2/zvK8vdlyL20i+jnUcch/w5jY= Received: from DU7P195CA0012.EURP195.PROD.OUTLOOK.COM (2603:10a6:10:54d::22) by PAWP122MB0332.EURP122.PROD.OUTLOOK.COM (2603:10a6:102:3a3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.43; Fri, 4 Apr 2025 12:10:46 +0000 Received: from DB1PEPF00050A00.eurprd03.prod.outlook.com (2603:10a6:10:54d:cafe::e2) by DU7P195CA0012.outlook.office365.com (2603:10a6:10:54d::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8606.27 via Frontend Transport; Fri, 4 Apr 2025 12:10:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 3.248.88.141) smtp.mailfrom=bbl.ms.philips.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=gmail.com; Received-SPF: Pass (protection.outlook.com: domain of bbl.ms.philips.com designates 3.248.88.141 as permitted sender) receiver=protection.outlook.com; client-ip=3.248.88.141; helo=ext-eur1.smtp.philips.com; pr=C Received: from ext-eur1.smtp.philips.com (3.248.88.141) by DB1PEPF00050A00.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8606.22 via Frontend Transport; Fri, 4 Apr 2025 12:10:45 +0000 Received: from smtprelay-eur1.philips.com ([130.138.84.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by ext-eur1.smtp.philips.com with ESMTPS id 0SNtu8jkZQb500fsjuUHRH; Fri, 04 Apr 2025 14:10:45 +0200 Received: from mail.bbl.ms.philips.com ([130.143.87.230]) by smtprelay-eur1.philips.com with ESMTP id 0fsjuQx3sFWGr0fsjuiJa1; Fri, 04 Apr 2025 14:10:45 +0200 X-CLAM-Verdict: legit X-CLAM-Score: ?? X-CLAM-Description: ?? Received: from bbl2xr12.bbl.ms.philips.com (bbl2xr12.bbl.ms.philips.com [130.143.223.70]) by mail.bbl.ms.philips.com (Postfix) with ESMTP id 7C42518476E for ; Fri, 4 Apr 2025 14:10:45 +0200 (CEST) Received: by bbl2xr12.bbl.ms.philips.com (Postfix, from userid 1876) id 7666C7C022A; Fri, 4 Apr 2025 14:10:45 +0200 (CEST) From: jhaller.oss@gmail.com To: bitbake-devel@lists.openembedded.org Subject: [PATCH v2 1/2] bitbake: fetch: Fix BB_FETCH_PREMIRRORONLY for git mirror tarballs Date: Fri, 4 Apr 2025 14:10:44 +0200 Message-ID: <20250404121045.1133722-1-jhaller.oss@gmail.com> X-Mailer: git-send-email 2.43.0 Reply-To: Julian Haller MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF00050A00:EE_|PAWP122MB0332:EE_ X-MS-Office365-Filtering-Correlation-Id: 61b5ad87-68de-4b85-47e8-08dd7371bab8 X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|61400799027|36860700013|7093399015|376014|82310400026|48200799018|35450700002; X-Microsoft-Antispam-Message-Info: G7fDbpVUqe2Njbz0xpjbUQ8LTMbKtbDxkBk/PstYIJRF+egLrqnxXZXRKLjrhjhWVFJDeuDYTSISUSNoo5wcGN1Tvn5O+sgw0VxvZPVGUUzWgtxbjCt5ggdGCNlG+O7RK9kMdbBGSycegdmobEK125Whzymo7eHHGSgzzEQXIXVwcYgpaYPXvO6/eBBbZIrO+4SVoliyKg47InGnq20U3sSmTRs7NhOqfT63bQjwiuXa3c+ry3gakMPy4A7q8K3FO6JqQQfaUN7iXiiTasENYvlhO5LcPg++qt1rdyY87CfaiK+oMwG/LIldVYjAuXHc9SIamTz3fhCP4a16GRMyGtW8fBeaaWuxo+x/9TkhQfffXzSVbVZU9E1tx7qhxvhoKCdNs8BBXgfxLAraGgwYTt42/6B6eG7vij2TVZowIzQ/hvArE/36Pbt4iGif4p/OoXaXoqbKjx3IhiXOrfIRJtf6AXMMB8+Aoj8beq5PM5FTEKHAuZSgOt2M+jX0X3gfq3mr9+xhubx7IB72JzHEW8rykQGoG7KKU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ext-eur1.smtp.philips.com;CAT:NONE;SFS:(13230040)(61400799027)(36860700013)(7093399015)(376014)(82310400026)(48200799018)(35450700002);DIR:OUT;SFP:1101; X-OriginatorOrg: ms.philips.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2025 12:10:45.7616 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61b5ad87-68de-4b85-47e8-08dd7371bab8 X-MS-Exchange-CrossTenant-Id: 1a407a2d-7675-4d17-8692-b3ac285306e4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1a407a2d-7675-4d17-8692-b3ac285306e4;Ip=[3.248.88.141];Helo=[ext-eur1.smtp.philips.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF00050A00.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWP122MB0332 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 ; Fri, 04 Apr 2025 12:10:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/17514 From: Julian Haller When invoking the original git fetcher after downloading a mirror tarball, BB_FETCH_PREMIRRORONLY is ignored. This leads to git fetch commands targeting the upstream source being executed silently. Ensure setting BB_NO_NETWORK before invoking the original fetcher. While this was only observed for git, setting this in general for all fetcher types makes sense at this location. --- bitbake/lib/bb/fetch2/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index e698fde19c..345b003efc 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -1072,6 +1072,10 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): # If that tarball is a local file:// we need to provide a symlink to it dldir = ld.getVar("DL_DIR") + if bb.utils.to_boolean(ld.getVar("BB_FETCH_PREMIRRORONLY")): + ld = ld.createCopy() + ld.setVar("BB_NO_NETWORK", "1") + if origud.mirrortarballs and os.path.basename(ud.localpath) in origud.mirrortarballs and os.path.basename(ud.localpath) != os.path.basename(origud.localpath): # Create donestamp in old format to avoid triggering a re-download if ud.donestamp: From patchwork Fri Apr 4 12:10:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Haller X-Patchwork-Id: 60714 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 93960C3601E for ; Fri, 4 Apr 2025 12:10:53 +0000 (UTC) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.44]) by mx.groups.io with SMTP id smtpd.web10.10094.1743768649405982401 for ; Fri, 04 Apr 2025 05:10:50 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@Philips.onmicrosoft.com header.s=selector2-Philips-onmicrosoft-com header.b=Cyzd8b9L; spf=pass (domain: bbl.ms.philips.com, ip: 40.107.20.44, mailfrom: jhaller@bbl.ms.philips.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CWL3MdCKdk1PPLJpiM+lJF7bD6MufosX7WUG3B9JlUmJEn6wpU7hnyKb8c/I+R8b1apOyGm8iNpz/EU12I77T5bFVomjRIske+IYj7IgUiMG0ykkSXw3IUtN8MIIORRAChHHEmFyDnPaTSzPJ+yD5f/oPOyirIFmI8G3tBjF6NkcbSeHIs1TQ9uQz5bAcNl2lfsYWvjTRWdWNrHg+iRUlXhrmDjE+poBSG/xrPLbfSut2JrX/rhr4ID9bcJ6v8/gTB6msRjYFZIay4UACNAp18TtIvUNfFhhs3WZXbFpwAnLwdarmY0TJ0tOBboUz+7rjR/3GmDPkY9/tFuEeBbQ0A== 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=SA5U0lTxPv4XZo1YxjWiiq91A+7rLi5zP3SK3sqzK78=; b=uSeG2nelG0eaSebK4agtzA5IfVcZzzypATV+g87bGgdMFZmYhHYBFY2k2QVCl3TlROn38ETx3MtYKQiQykDUuteM46m2CuJk89zqFcUflvRwjHnTau2Fz/J4t4Vwhr5rc6CzbAOrYc2bLQu2DhoNw8Z/jt7FoIM7qjEOdk2Hpc3iUvLuUANcbJLe5h8XBZ28crbhgIjiI0ijTPtR3rnANyowU5lqH305GSkceGcNbf8QxBftL25ZQlsUDNXPGKAo+aTn5CoecomU7nlcyZvpMXAsIxqQeXK3HYOfzssRvITpxjLrc4UClsOM1SeuT7SnCVfoMBIebCMSVm+4oJI19w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 3.248.88.141) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=bbl.ms.philips.com; dmarc=fail (p=none sp=quarantine pct=100) action=none header.from=gmail.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Philips.onmicrosoft.com; s=selector2-Philips-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SA5U0lTxPv4XZo1YxjWiiq91A+7rLi5zP3SK3sqzK78=; b=Cyzd8b9Lgw2z0P5E8DcrMA5O5YNdoUWBKCpBNIVI9HtnSq0xWynlvNlDHVe4LtuoeuZg4NOLmpnUZd3kyrYgVVITDFg56tvHCHlgZ1SIMkD2GOhq0slDZW4UBsMsJxn3WsPrUyq05JeldnbguANSwzC/6Vvzw6yGszk4cnFJ7X8= Received: from DB6PR0301CA0076.eurprd03.prod.outlook.com (2603:10a6:6:30::23) by GV1P122MB0302.EURP122.PROD.OUTLOOK.COM (2603:10a6:150:e8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8583.42; Fri, 4 Apr 2025 12:10:46 +0000 Received: from DB1PEPF00039231.eurprd03.prod.outlook.com (2603:10a6:6:30:cafe::8a) by DB6PR0301CA0076.outlook.office365.com (2603:10a6:6:30::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8606.26 via Frontend Transport; Fri, 4 Apr 2025 12:10:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 3.248.88.141) smtp.mailfrom=bbl.ms.philips.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=gmail.com; Received-SPF: Pass (protection.outlook.com: domain of bbl.ms.philips.com designates 3.248.88.141 as permitted sender) receiver=protection.outlook.com; client-ip=3.248.88.141; helo=ext-eur1.smtp.philips.com; pr=C Received: from ext-eur1.smtp.philips.com (3.248.88.141) by DB1PEPF00039231.mail.protection.outlook.com (10.167.8.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8606.22 via Frontend Transport; Fri, 4 Apr 2025 12:10:45 +0000 Received: from smtprelay-eur1.philips.com ([130.138.84.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by ext-eur1.smtp.philips.com with ESMTPS id 0Seeu8kyNQb500fsjuUHRI; Fri, 04 Apr 2025 14:10:45 +0200 Received: from mail.bbl.ms.philips.com ([130.143.87.230]) by smtprelay-eur1.philips.com with ESMTP id 0fsjuQx3tFWGr0fsjuiJa2; Fri, 04 Apr 2025 14:10:45 +0200 X-CLAM-Verdict: legit X-CLAM-Score: ?? X-CLAM-Description: ?? Received: from bbl2xr12.bbl.ms.philips.com (bbl2xr12.bbl.ms.philips.com [130.143.223.70]) by mail.bbl.ms.philips.com (Postfix) with ESMTP id 7E508184869 for ; Fri, 4 Apr 2025 14:10:45 +0200 (CEST) Received: by bbl2xr12.bbl.ms.philips.com (Postfix, from userid 1876) id 793E87C0086; Fri, 4 Apr 2025 14:10:45 +0200 (CEST) From: jhaller.oss@gmail.com To: bitbake-devel@lists.openembedded.org Subject: [PATCH v2 2/2] bitbake: tests/fetch: Fix git PREMIRRORONLY test Date: Fri, 4 Apr 2025 14:10:45 +0200 Message-ID: <20250404121045.1133722-2-jhaller.oss@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250404121045.1133722-1-jhaller.oss@gmail.com> References: <20250404121045.1133722-1-jhaller.oss@gmail.com> Reply-To: Julian Haller MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF00039231:EE_|GV1P122MB0302:EE_ X-MS-Office365-Filtering-Correlation-Id: c3f60357-5f7b-4955-b085-08dd7371babc X-MS-Exchange-SenderADCheck: 0 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|48200799018|7093399015|376014|61400799027|35450700002; X-Microsoft-Antispam-Message-Info: rT2Sl3/mALNphw2wTsuimrXwqojn1NWPP6liVfnqKGOtG/HvjN2/UDOMgbPxXrl41MoLe+zndu7imjaqhNMkkrl+XwRCraaV+d8QKBBPc4uH4/Q3071gu7Hb0TRfddKovM2PBDhA6EC62oCWLK7NuMvrlr9aLX55rrmfHga1C7oP+UsPTP+u7L7SkcLdnUjjpMUhyBn2nSyEWdBJW8RzvT5VuGW5LZ3qcKSVSAdKcnNEaE8y3GcKgwawWnQ5Y83Nx/+RiZeRP5yqXasRMYPiVVbU5UUomDGz29mullwC1I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YoZJJVnzG2hXqpDQpXZgMgUWP4IN8oTyeUxeZWilppgzEGn8dTG4BuzzhGVnMAJUEsIEHXEeEbavTm18Gn2HAlOfN9V4XPfdGAx8/eKlinfnBS+6XKdUuZ4iahQ1qavYieJ5Qn+y01C6559TnIChWspKC0KcwCRQc55v7ZYZf7Bpqwu X-Forefront-Antispam-Report: CIP:3.248.88.141;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ext-eur1.smtp.philips.com;PTR:ext-eur1.smtp.philips.com;CAT:NONE;SFS:(13230040)(36860700013)(82310400026)(48200799018)(7093399015)(376014)(61400799027)(35450700002);DIR:OUT;SFP:1101; X-OriginatorOrg: ms.philips.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2025 12:10:45.7905 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3f60357-5f7b-4955-b085-08dd7371babc X-MS-Exchange-CrossTenant-Id: 1a407a2d-7675-4d17-8692-b3ac285306e4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1a407a2d-7675-4d17-8692-b3ac285306e4;Ip=[3.248.88.141];Helo=[ext-eur1.smtp.philips.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF00039231.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P122MB0302 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 ; Fri, 04 Apr 2025 12:10:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/17515 From: Julian Haller Using a shallow clone to simulate an outdated git mirror tarball does not work in the intended way. A shallow clone already contains the latest commit which can hide certain fetcher behavior. Simulate an outdated mirror tarball, as the test titles indicate, by removing the newer commits from the mirror. --- bitbake/lib/bb/tests/fetch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index afabaeba18..d682b7fbe5 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py @@ -3276,7 +3276,8 @@ class FetchPremirroronlyNetworkTest(FetcherTest): import shutil self.mirrorname = "git2_git.yoctoproject.org.fstests.tar.gz" os.makedirs(self.clonedir) - self.git("clone --bare --shallow-since=\"01.01.2013\" {}".format(self.recipe_url), self.clonedir) + self.git("clone --bare {}".format(self.recipe_url), self.clonedir) + self.git("update-ref HEAD 15413486df1f5a5b5af699b6f3ba5f0984e52a9f", self.gitdir) bb.process.run('tar -czvf {} .'.format(os.path.join(self.mirrordir, self.mirrorname)), cwd = self.gitdir) shutil.rmtree(self.clonedir) @@ -3284,7 +3285,7 @@ class FetchPremirroronlyNetworkTest(FetcherTest): def test_mirror_tarball_updated(self): self.make_git_repo() ## Upstream commit is in the mirror - self.d.setVar("SRCREV", "49d65d53c2bf558ae6e9185af0f3af7b79d255ec") + self.d.setVar("SRCREV", "15413486df1f5a5b5af699b6f3ba5f0984e52a9f") fetcher = bb.fetch.Fetch([self.recipe_url], self.d) fetcher.download() @@ -3292,7 +3293,7 @@ class FetchPremirroronlyNetworkTest(FetcherTest): def test_mirror_tarball_outdated(self): self.make_git_repo() ## Upstream commit not in the mirror - self.d.setVar("SRCREV", "15413486df1f5a5b5af699b6f3ba5f0984e52a9f") + self.d.setVar("SRCREV", "49d65d53c2bf558ae6e9185af0f3af7b79d255ec") fetcher = bb.fetch.Fetch([self.recipe_url], self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download()