From patchwork Fri Aug 21 17:06:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "chris.laplante@agilent.com" X-Patchwork-Id: 96016 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 CA12DC5DF94 for ; Fri, 21 Aug 2026 17:06:58 +0000 (UTC) Received: from SJ2PR03CU001.outbound.protection.outlook.com (SJ2PR03CU001.outbound.protection.outlook.com [52.101.43.58]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.11.1787332013544301972 for ; Fri, 21 Aug 2026 10:06:53 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=lHl2Hxc3; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: agilent.com, ip: 52.101.43.58, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PmQiphr1s9xViUWEVTjj/o97lvpB1VorgVpSl2GN/z71v5k1XjYdKfaCWtvaZyFGO3sQ6/EAA0W1WSGShjeqdya4bWlt1iwZOO3C4sJfK8CLBGvw1EYWtOPRWDRLsOwstURrEstx25vlvQoALBuFukbT96H8lzI3qpraUdsIy1AIz2QqLAOQnW3zELY7FN9rHdWmDDoVmANUbCHipvPmKDTaLg/E2IsSiZOiY7L98EBpoCSGESazKsXFZtmDDorcnp3h+qxkarSAzXTR0gur93ozoXPGecskEEQFqcSe3IMA7SimnhtbYr8N9dOBplWeJ0s1xscfkQCDsEo/o5yUGQ== 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=QmckgNDx9luX8PPiO3GaYgxodPBHqmLORxv+7ISK4Nk=; b=pO1hnbRMEy+hEcJjT/Klwr0ZMKPmWxzhtSLaxLMlw+3Z1f9ARX7MpnWf+o+XcaVUZS0IUxaUDuGwCez/aMV8mD+3MMBMdxptRKY+54iNjjSyzNhZ8txnhXhQ+2F9/wRReyo0+AsGpgF3J6JaogmUmrZD83bnhjcYwIMMT2IBmoHDBbfGmaSMrbooXo+GkmXumG8896owAYmTRDUHRDWmaeo1yJ/V5kCsrl8GZUNicgcYpCWVU1IsepY00DwPWTu29FcNHVKOy11R9J4eO803uBc3qY/FfhLp4Ss1NVdJhA0DUqsTnAmqL8W2+J2u42mkvb3xmPlMHReDGTLMNlVg2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.25.218.36) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=agilent.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=agilent.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agilent.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QmckgNDx9luX8PPiO3GaYgxodPBHqmLORxv+7ISK4Nk=; b=lHl2Hxc36cDKkyUE5POrgrtd4Qek6XgbAPORIfmh+1XVsezvQYVsAjGXvClLXpqw+hnC8VGk0oW3wITdEOm4DfwNbOgKxCjOBGMZpKkx4L8efxGDlfwntEM97258RsPWGYq69SP4Y+KDQ55joobEBsWaDiVA31oevycj95AOfyFa22PVOcGHHf2CH9G9DKCTgQGo+rbnNR5DuCtgVe6/NFbK6KZgqKXNR+QHqYh7p8Z+k/KgqZDbuzwa0FeQIJWXLbVuhymlJMIUJoZ7CYEB/2yB6LZaIjcceLJC1YwARvQy5U8lzYqCb2i1Vi2AegeDH3MlK4XSCpCXXsgp+Jck9Q== Received: from BN9PR03CA0626.namprd03.prod.outlook.com (2603:10b6:408:106::31) by CYYPR12MB8924.namprd12.prod.outlook.com (2603:10b6:930:bd::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.339.11; Fri, 21 Aug 2026 17:06:49 +0000 Received: from BL02EPF0002992C.namprd02.prod.outlook.com (2603:10b6:408:106:cafe::56) by BN9PR03CA0626.outlook.office365.com (2603:10b6:408:106::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.339.10 via Frontend Transport; Fri, 21 Aug 2026 17:06:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.25.218.36) smtp.mailfrom=agilent.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=agilent.com; Received-SPF: Pass (protection.outlook.com: domain of agilent.com designates 192.25.218.36 as permitted sender) receiver=protection.outlook.com; client-ip=192.25.218.36; helo=wpcosapexchedg5.windmz.agilent.com; pr=C Received: from wpcosapexchedg5.windmz.agilent.com (192.25.218.36) by BL02EPF0002992C.mail.protection.outlook.com (10.167.249.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.360.3 via Frontend Transport; Fri, 21 Aug 2026 17:06:48 +0000 Received: from laplante-B650.lfs.agilent.com (192.25.126.4) by edgeappmail.agilent.com (192.25.218.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Fri, 21 Aug 2026 11:06:40 -0600 From: To: CC: Chris Laplante Subject: [PATCH 1/3] bin/bitbake-setup: use bb.fetch2, not bb.fetch Date: Fri, 21 Aug 2026 13:06:22 -0400 Message-ID: <20260821170624.436725-2-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260821170624.436725-1-chris.laplante@agilent.com> References: <20260821170624.436725-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0002992C:EE_|CYYPR12MB8924:EE_ X-MS-Office365-Filtering-Correlation-Id: ab5bbd50-3721-4a2c-9235-08deffa696a8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|23010399003|1800799024|36860700016|376014|56012099006|10067099003|3023799007|6133799003|18002099003|22082099003|11063799006; X-Microsoft-Antispam-Message-Info: IvsRVf+L0ghCPkiPGaPYpA0YDfDRc0LDXBsuiOBUpbQlrotV6XO+7+UwA+xnBXuqaNRlhcBkeptJdVBdKK319JFaZjvJEGzJ2JoYJTh7fjtkTlwLy2jojTfksgSOmozwn8bgGrG7ej4yfDUulBXprJf5yTu+fd2Tv56G6Axaubw7xcWGFGZ9BirbCk6qTQZGpoItY9cdDsNPIuS4tlmPraXQZ952inQ8Dj6zw8Qw3dV9h5YNhZ3/D5UUqkxtqClV0abpCQKaalEWhGVCw4E5ft6DbGAvFJZlnOXKGjH6KrKgTmAg6IyyQ75FiQAWllgVYWoD++m0uzcv//wSe0zt1qOLb4/Qu/6q8Vz2gBGeQErRY+NpazuFHgS6x+mz+ERbpOXnwnWqo7WgXhAXjkEeK6gNEqjSue8x5ZAkNIDCIcvlPDHTf5k652WYWQcqr2eDEyLJjObd9S73MAJrCqGesYACLuMOT1p4FY2YLXHDE5hwkxl9VK261eH492/nGOjm31YDAdxACJ1ZpWK03lmnTeOhN77slSmTDMttQ3uhgq83i2o+uyny4tfVwRM9ha28VqKZn0A8ggrOtcEFqxSu0pETAYeJNKe05EiQ6PJ+b1vd2kCF33LGgAOeRN3Rkt8aDvtYUn/j0/uj51AvJwYZiEZ2Yte/ZBy3h2iDbm3l2PhkMhfe8aiq6AR7VqjhOG7rAh3L6GBQ8ZBY5pKCYKffiA== X-Forefront-Antispam-Report: CIP:192.25.218.36;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:wpcosapexchedg5.windmz.agilent.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(23010399003)(1800799024)(36860700016)(376014)(56012099006)(10067099003)(3023799007)(6133799003)(18002099003)(22082099003)(11063799006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OtWqPFycFp6+M7Gv7wu3GQd1tjS2yfHwDkE6MBpWkj9mpyNnvFtXVsR9RVMAOntZFWK7ku+/7DwY6F83GWOfftFMNlmYMi8NQbKoSYeIMt5rED1CezZ6x6EgZGJXARn7vPiXa3y8hfQjHbsbjGrxuwdJDMOyuMkbtf3dJOtj+lk55DUPgIfWlVGihmlKJqa5J45nRZv1Z91S4v95gg0B2CvD+4BQcuiqJNFxIx9xQlY0W/dXtBqvaROG8AsP5kPIxApsWZ/9Ty2sR7OTYErZhrfoiBcrQ8vZkuuyqM728ilpAxs69/QxD7jUfCR4yOwbHCvo0p0NYdf0r1hzjS26MZAqVjoJZ6aqM6G7FLVQsmSI9FozvZxTO9aEcacrhbaCPjPTT4DuwVNmwrIKuD8iiPEa/2iVZD89LNDDditEeoFxiDyWnzaetC24p8yMSD5i X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2026 17:06:48.9178 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab5bbd50-3721-4a2c-9235-08deffa696a8 X-MS-Exchange-CrossTenant-Id: a9c0bc09-8b46-4206-9351-2ba12fb4a5c0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a9c0bc09-8b46-4206-9351-2ba12fb4a5c0;Ip=[192.25.218.36];Helo=[wpcosapexchedg5.windmz.agilent.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BL02EPF0002992C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8924 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 21 Aug 2026 17:06:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/20009 From: Chris Laplante Signed-off-by: Chris Laplante --- bin/bitbake-setup | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 92ed563c2..3d349663f 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -104,7 +104,7 @@ def init_bb_cache(top_dir, settings, args): d.setVar("__BBSRCREV_SEEN", "1") if args.no_network: d.setVar("BB_SRCREV_POLICY", "cache") - bb.fetch.fetcher_init(d) + bb.fetch2.fetcher_init(d) return d def save_bb_cache(): @@ -181,14 +181,14 @@ def checkout_layers(layers, confdir, layerdir, d, rebase_conflicts_strategy='abo remotes = _get_remotes(r_remote) for remote in remotes: - prot,host,path,user,pswd,params = bb.fetch.decodeurl(remote) - fetchuri = bb.fetch.encodeurl(('git',host,path,user,pswd,params)) + prot,host,path,user,pswd,params = bb.fetch2.decodeurl(remote) + fetchuri = bb.fetch2.encodeurl(('git',host,path,user,pswd,params)) logger.plain(" {}".format(r_name)) if branch: src_uri = f"{fetchuri};protocol={prot};rev={rev};branch={branch};destsuffix={repodir}" else: src_uri = f"{fetchuri};protocol={prot};rev={rev};nobranch=1;destsuffix={repodir}" - fetcher = bb.fetch.Fetch([src_uri], d) + fetcher = bb.fetch2.Fetch([src_uri], d) repodir_path = os.path.join(layerdir, repodir) try: do_fetch(fetcher, layerdir) @@ -909,12 +909,12 @@ def are_layers_changed(layers, layerdir, d): remotes = _get_remotes(r_remote) changed = False for remote in remotes: - type,host,path,user,pswd,params = bb.fetch.decodeurl(remote) - fetchuri = bb.fetch.encodeurl(('git',host,path,user,pswd,params)) + type,host,path,user,pswd,params = bb.fetch2.decodeurl(remote) + fetchuri = bb.fetch2.encodeurl(('git',host,path,user,pswd,params)) if branch: - fetcher = bb.fetch.FetchData("{};protocol={};rev={};branch={};destsuffix={}".format(fetchuri,type,rev,branch,repodir), d) + fetcher = bb.fetch2.FetchData("{};protocol={};rev={};branch={};destsuffix={}".format(fetchuri,type,rev,branch,repodir), d) else: - fetcher = bb.fetch.FetchData("{};protocol={};rev={};nobranch=1;destsuffix={}".format(fetchuri,type,rev,repodir), d) + fetcher = bb.fetch2.FetchData("{};protocol={};rev={};nobranch=1;destsuffix={}".format(fetchuri,type,rev,repodir), d) upstream_revision = fetcher.method.latest_revision(fetcher, d, 'default') if upstream_revision != local_revision: changed = True @@ -995,7 +995,7 @@ def update_registry(registry, cachedir, d): else: full_registrydir = os.path.join(cachedir, registrydir) logger.info("Fetching configuration registry\n {}\ninto\n {}".format(registry, full_registrydir)) - fetcher = bb.fetch.Fetch(["{};destsuffix={}".format(registry, registrydir)], d) + fetcher = bb.fetch2.Fetch(["{};destsuffix={}".format(registry, registrydir)], d) do_fetch(fetcher, cachedir) return full_registrydir @@ -1105,7 +1105,7 @@ def install_buildtools(top_dir, settings, args, d): logger.plain("Fetching buildtools installer using bitbake fetcher") logger.plain(" {}".format(url)) - fetcher = bb.fetch.Fetch([src_uri], d) + fetcher = bb.fetch2.Fetch([src_uri], d) try: fetcher.download() except bb.fetch2.ChecksumError as e: From patchwork Fri Aug 21 17:06:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "chris.laplante@agilent.com" X-Patchwork-Id: 96018 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 D3198C5DF8C for ; Fri, 21 Aug 2026 17:07:08 +0000 (UTC) Received: from MW6PR02CU001.outbound.protection.outlook.com (MW6PR02CU001.outbound.protection.outlook.com [52.101.48.60]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.18.1787332023222710329 for ; Fri, 21 Aug 2026 10:07:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=BiKq8QBV; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: agilent.com, ip: 52.101.48.60, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SYkgDrGhAOmK1SAsNc+Ge5Zi1/PbeueI16IPpjCiNpNADcZuX2cualblrkMwV5Wm5isQzBtna+sl4CQicwDjIhBlhvVn4bDYpcYsEJRBplwfuO5f44tBCF/jZID/bUEoQ3HFm1eGajjxC7VZYHE7i3hhM7u93/cjyzJK95yXKAA10DWSPmEPUKFzBvdaX2L6a3nzqJRw09GqhDFuJRDoGavyIr7yRlel4rl4LEsAhWvMppjXAFna/53d/bgIOdRqoVfQSnG19LuaGSsdmzPEuqC7ugKN+bHefEFL7sdO5KBGSNfyYLLpf6+20DclSvH/hdUx7nxKIF4EF66FcsnNFw== 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=Z4lcocISYT3Ev7HZ/WQRNBuAUFeAYUbDWglGJecdzsg=; b=amXIKJakpnWKIqOOL6oLyZG4mpjaIPYjb6XuEaRQj+8GWsj3nR74PSFuBIW4CBedo1CBYhxwRLGklxTxIGqG2DLbjIklQFcSzQr+LokhjoyHoPJiQzkmJTtxMoa+deUJwJ71RRJXf1ZIf+5OXy0z8VpYoiIWe3lpIkJ3Gz46/U3jgDt8a9kBVIhQFZgnwkhRZ9jTwxtpot9GwKORwsm+KzSM9xSS4pBnIxSm6MXPNzTcaO0wacyC5mlJ8v8GKil+nDVqKkUGSi4wEFnRK+HRatKrYDP2IXw5eWOlZJPQ2bF4jwVCoFadYBEKor+8OaAVbxlQbGn795SQJVEJxpFhKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.25.218.36) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=agilent.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=agilent.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agilent.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z4lcocISYT3Ev7HZ/WQRNBuAUFeAYUbDWglGJecdzsg=; b=BiKq8QBV4XxfghhyvSUYov7XTbDRdIPblw3Y1gGE96eMtJjS6UVbTmzOMt53hx+Jjb0IcVT7RvbeZ2je8s1z/zKcdtprecJLDFNlCXMzWePl3owWLRf51ESd8hFsthFFmsML6UmWyq1GMZxE2bqlmP6GofL81se/27LO7ie9NFQZhj5HVC6VDCaRTLp/RZ0zuk6sPY7ZPjtUmGh9ijedXovCgSN72abJMIm9OPpkpQWFjW4HjNbEXvrcyvvjbWYCUb+NZP72mi0iXDXZjQQjPI5i85rnIdJ/xAhkCgrpBXFV+0IHQVQzHsxEYGnReGY3zgf3mfSasc6KUxFVnnv3bQ== Received: from BN9PR03CA0606.namprd03.prod.outlook.com (2603:10b6:408:106::11) by MW6PR12MB8757.namprd12.prod.outlook.com (2603:10b6:303:239::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.339.11; Fri, 21 Aug 2026 17:06:50 +0000 Received: from BL02EPF0002992C.namprd02.prod.outlook.com (2603:10b6:408:106:cafe::3e) by BN9PR03CA0606.outlook.office365.com (2603:10b6:408:106::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.339.11 via Frontend Transport; Fri, 21 Aug 2026 17:06:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.25.218.36) smtp.mailfrom=agilent.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=agilent.com; Received-SPF: Pass (protection.outlook.com: domain of agilent.com designates 192.25.218.36 as permitted sender) receiver=protection.outlook.com; client-ip=192.25.218.36; helo=wpcosapexchedg5.windmz.agilent.com; pr=C Received: from wpcosapexchedg5.windmz.agilent.com (192.25.218.36) by BL02EPF0002992C.mail.protection.outlook.com (10.167.249.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.360.3 via Frontend Transport; Fri, 21 Aug 2026 17:06:50 +0000 Received: from laplante-B650.lfs.agilent.com (192.25.126.4) by edgeappmail.agilent.com (192.25.218.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Fri, 21 Aug 2026 11:06:41 -0600 From: To: CC: Chris Laplante Subject: [PATCH 2/3] lib: use bb.fetch2, not bb.fetch Date: Fri, 21 Aug 2026 13:06:23 -0400 Message-ID: <20260821170624.436725-3-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260821170624.436725-1-chris.laplante@agilent.com> References: <20260821170624.436725-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0002992C:EE_|MW6PR12MB8757:EE_ X-MS-Office365-Filtering-Correlation-Id: 414b0f2c-7017-4a58-d0d7-08deffa69794 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|23010399003|1800799024|36860700016|82310400026|10067099003|11063799006|56012099006|3023799007|13003099007|6133799003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: NpO488CKxsVBQZyEUxFC4qI3+Vmyg7o6/aX767giwf0klWC+02xjyW0Q28X43ip14f1SueAyriMRPeCtLbVO3XicVg9oVaC58s1i/T2gh2+LVHxl9hm/vLNLQU26BjEuYwXS9SwDwY2cUpovWNCad70P4wBTyhWmt3wTo9SRP7T+UCyPFszBv7qP0Su6qdE1XYM+CUj9BhW3m7ud8eaa6XASTopK7vsv9LzBr79qR7q3BIiF3pDvBDBEPHj6b6LZK3IRd8MYj43pFylSjJXKT3WKJ5mVbefbNCZHZOtx91igEL4yl//ye99sYlPo6PYhfCt3ksgpFfpBH4JNysOMd2Ku583GPY0WWYwGy5TZEVxWkKX+gHHfCJlyxfq4yIye0LSjRKixuJQSVI3LUqQ6D9ib0tm/BD1aQqiC9cz45laV8OFamD+iEnbEbBr6nvvnB7UYyjHrQEbpSeGePLKHhdVqcUVHmx2r9N1mndIc2gurJktK/M8PAbDujgO1cQBKg4WC09OAsxZLHcd7EsUScSzjpXo81mRnybUqcK0eKHJCZWG3AqQ3dLaKreUjRo2Kw2Npie8qsFTMOLfbVK0zab8ed+G02A08Dc66dqqc9QCJhaOd+JucSIgjrTov1sUIF/a0899NfcDuFiGjING05w== X-Forefront-Antispam-Report: CIP:192.25.218.36;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:wpcosapexchedg5.windmz.agilent.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(23010399003)(1800799024)(36860700016)(82310400026)(10067099003)(11063799006)(56012099006)(3023799007)(13003099007)(6133799003)(22082099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: D50dUNHR63t0dpKHWma6+6tYRSr9CJmJHzlDi1iRlf8FEV0GaeRQ1lW8wa7afmhI+x45XCl4mTnEYh1CJXUW0d6TfNjO1UW5Y6XywL+TNrkHVai9cV3hnOLmTpHX0LcjdopQdLW8abN5TOdsM2HdBJSavpPLHRyljQo/wieZGcX7cGlkAtAybGF6eVvN7A8xPI2d9SFBhKEuctLuWavsktdVvtoqAji+39xCbC84axtKWFLZ1mRmag8HFt0/SdgXGU57NTcaBZfTpm/P9PsJs26dqa3pv9XIVqa3ejGZL5OvtZ4Na7rSaZ+hQ/Qc24zlNWQR3pM0PoM3Jndy3eyKWN8kUDyd2IHv96vjqxEGtja3gu6vE3THFsYqWp83LRtuGzQXZVOTHnJyw/HPO6dynus5XNGJq3DhiTWIqAE4hSLFsq8XsnBbl6co2NEZlfAp X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2026 17:06:50.4579 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 414b0f2c-7017-4a58-d0d7-08deffa69794 X-MS-Exchange-CrossTenant-Id: a9c0bc09-8b46-4206-9351-2ba12fb4a5c0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a9c0bc09-8b46-4206-9351-2ba12fb4a5c0;Ip=[192.25.218.36];Helo=[wpcosapexchedg5.windmz.agilent.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BL02EPF0002992C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB8757 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 21 Aug 2026 17:07:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/20011 From: Chris Laplante Signed-off-by: Chris Laplante --- lib/bb/command.py | 2 +- lib/bb/cooker.py | 6 +- lib/bb/cookerdata.py | 2 +- lib/bb/fetch2/gitannex.py | 8 +- lib/bb/fetch2/wget.py | 6 +- lib/bb/tests/fetch.py | 244 +++++++++++++++++++------------------- 6 files changed, 134 insertions(+), 134 deletions(-) diff --git a/lib/bb/command.py b/lib/bb/command.py index 1b16884fa..953d546a4 100644 --- a/lib/bb/command.py +++ b/lib/bb/command.py @@ -765,7 +765,7 @@ class CommandsAsync: """ Parse the .bb files """ - if bb.fetch.fetcher_compare_revisions(command.cooker.data): + if bb.fetch2.fetcher_compare_revisions(command.cooker.data): command.finishAsyncCommand(code=1) else: command.finishAsyncCommand() diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 0321478d3..94452027e 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -1310,7 +1310,7 @@ You can also remove the BB_HASHSERVE_UPSTREAM setting, but this may result in si file associated with a recipe might have been modified by the user). """ build.reset_cache() - bb.fetch._checksum_cache.mtime_cache.clear() + bb.fetch2._checksum_cache.mtime_cache.clear() siggen_cache = getattr(bb.parse.siggen, 'checksum_cache', None) if siggen_cache: bb.parse.siggen.checksum_cache.mtime_cache.clear() @@ -2092,7 +2092,7 @@ class Parser(multiprocessing.Process): signal.signal(signal.SIGINT, self.catch_sig) bb.utils.set_process_name(multiprocessing.current_process().name) multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, exitpriority=1) - multiprocessing.util.Finalize(None, bb.fetch.fetcher_parse_save, exitpriority=1) + multiprocessing.util.Finalize(None, bb.fetch2.fetcher_parse_save, exitpriority=1) pending = [] havejobs = True @@ -2286,7 +2286,7 @@ class CookerParser(object): bb.codeparser.parser_cache_save() bb.codeparser.parser_cache_savemerge() bb.cache.SiggenRecipeInfo.reset() - bb.fetch.fetcher_parse_done() + bb.fetch2.fetcher_parse_done() if self.cooker.configuration.profile: profiles = [] for i in self.process_names: diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py index 59f808c96..c5fcd71be 100644 --- a/lib/bb/cookerdata.py +++ b/lib/bb/cookerdata.py @@ -277,7 +277,7 @@ class CookerDataBuilder(object): self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles) servercontext = self.data.getVar("BB_WORKERCONTEXT", False) is None and not worker - bb.fetch.fetcher_init(self.data, servercontext) + bb.fetch2.fetcher_init(self.data, servercontext) bb.parse.init_parser(self.data) bb.event.fire(bb.event.ConfigParsed(), self.data) diff --git a/lib/bb/fetch2/gitannex.py b/lib/bb/fetch2/gitannex.py index c378cc36d..faac23d58 100644 --- a/lib/bb/fetch2/gitannex.py +++ b/lib/bb/fetch2/gitannex.py @@ -29,7 +29,7 @@ class GitANNEX(Git): try: runfetchcmd(ud.basecmd + ['rev-list', 'git-annex'], d, quiet=True, workdir=wd) return True - except bb.fetch.FetchError: + except bb.fetch2.FetchError: pass return False @@ -37,7 +37,7 @@ class GitANNEX(Git): def update_annex(self, ud, d, wd): try: runfetchcmd(ud.basecmd + ['annex', 'get', '--all'], d, quiet=True, workdir=wd) - except bb.fetch.FetchError: + except bb.fetch2.FetchError: return False runfetchcmd(['chmod', 'u+w', '-R', '%s/annex' % ud.clonedir], d, quiet=True, workdir=wd) @@ -55,7 +55,7 @@ class GitANNEX(Git): try: runfetchcmd(ud.basecmd + ['annex', 'init'], d, workdir=dest) - except bb.fetch.FetchError: + except bb.fetch2.FetchError: pass if self.uses_annex(ud, d, dest): @@ -67,7 +67,7 @@ class GitANNEX(Git): try: runfetchcmd(ud.basecmd + ['annex' ,'init'], d, workdir=ud.destdir) - except bb.fetch.FetchError: + except bb.fetch2.FetchError: pass annex = self.uses_annex(ud, d, ud.destdir) diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py index 0d2b7f5c8..9cb021419 100644 --- a/lib/bb/fetch2/wget.py +++ b/lib/bb/fetch2/wget.py @@ -632,7 +632,7 @@ class Wget(FetchMethod): else: version_dir[1] = dirver - dirs_uri = bb.fetch.encodeurl([ud.type, ud.host, + dirs_uri = bb.fetch2.encodeurl([ud.type, ud.host, ud.path.split(dirver)[0], ud.user, ud.pswd, {}]) bb.debug(3, "DirURL: %s, %s" % (dirs_uri, package)) @@ -658,7 +658,7 @@ class Wget(FetchMethod): dirver_new = spfx + sver path = ud.path.replace(dirver, dirver_new, True) \ .split(package)[0] - uri = bb.fetch.encodeurl([ud.type, ud.host, path, + uri = bb.fetch2.encodeurl([ud.type, ud.host, path, ud.user, ud.pswd, {}]) pupver = self._check_latest_version(uri, @@ -765,7 +765,7 @@ class Wget(FetchMethod): return (self._check_latest_version_by_dir(dirver, package, package_regex, current_version, ud, d, filter_regex), '') - uri = bb.fetch.encodeurl([ud.type, ud.host, path, ud.user, ud.pswd, {}]) + uri = bb.fetch2.encodeurl([ud.type, ud.host, path, ud.user, ud.pswd, {}]) else: uri = regex_uri diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index a1e4b45f8..c0b2f155a 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -518,28 +518,28 @@ class MirrorUriTest(FetcherTest): def test_urireplace(self): self.d.setVar("FILESPATH", ".") for k, v in self.replaceuris.items(): - ud = bb.fetch.FetchData(k[0], self.d) + ud = bb.fetch2.FetchData(k[0], self.d) ud.setup_localpath(self.d) mirrors = bb.fetch2.mirror_from_string("%s %s" % (k[1], k[2])) newuris, uds = bb.fetch2.build_mirroruris(ud, mirrors, self.d) self.assertEqual([v] if v else [], newuris) def test_urilist1(self): - fetcher = bb.fetch.FetchData("http://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) + fetcher = bb.fetch2.FetchData("http://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) mirrors = bb.fetch2.mirror_from_string(self.mirrorvar) uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) self.assertEqual(uris, ['file:///somepath/downloads/bitbake-1.0.tar.gz', 'file:///someotherpath/downloads/bitbake-1.0.tar.gz']) def test_urilist2(self): # Catch https:// -> files:// bug - fetcher = bb.fetch.FetchData("https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) + fetcher = bb.fetch2.FetchData("https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) mirrors = bb.fetch2.mirror_from_string(self.mirrorvar) uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) self.assertEqual(uris, ['file:///someotherpath/downloads/bitbake-1.0.tar.gz']) def test_urilistsvn(self): # Catch svn:// -> svn:// bug - fetcher = bb.fetch.FetchData("svn://svn.server1.com/isource/svnroot/reponame/tags/tagname;module=path_in_tagnamefolder;protocol=https;rev=2", self.d) + fetcher = bb.fetch2.FetchData("svn://svn.server1.com/isource/svnroot/reponame/tags/tagname;module=path_in_tagnamefolder;protocol=https;rev=2", self.d) mirrors = bb.fetch2.mirror_from_string(self.mirrorvar) uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) self.assertEqual(uris, ['svn://svn.server2.com/isource/svnroot/reponame/tags/tagname;module=path_in_tagnamefolder;protocol=https;rev=2']) @@ -548,7 +548,7 @@ class MirrorUriTest(FetcherTest): # Test if mirror of a mirror works mirrorvar = self.mirrorvar + " http://.*/.* http://otherdownloads.yoctoproject.org/downloads/" mirrorvar = mirrorvar + " http://otherdownloads.yoctoproject.org/.* http://downloads2.yoctoproject.org/downloads/" - fetcher = bb.fetch.FetchData("http://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) + fetcher = bb.fetch2.FetchData("http://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) mirrors = bb.fetch2.mirror_from_string(mirrorvar) uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) self.assertEqual(uris, ['file:///somepath/downloads/bitbake-1.0.tar.gz', @@ -560,7 +560,7 @@ class MirrorUriTest(FetcherTest): "https://.*/[^/]* https://bbbb/B/B/B/" def test_recursive(self): - fetcher = bb.fetch.FetchData("https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) + fetcher = bb.fetch2.FetchData("https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) mirrors = bb.fetch2.mirror_from_string(self.recmirrorvar) uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) self.assertEqual(uris, ['http://aaaa/A/A/A/bitbake/bitbake-1.0.tar.gz', @@ -584,7 +584,7 @@ class GitDownloadDirectoryNamingTest(FetcherTest): @skipIfNoNetwork() def test_that_directory_is_named_after_recipe_url_when_no_mirroring_is_used(self): self.setup_mirror_rewrite() - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @@ -594,7 +594,7 @@ class GitDownloadDirectoryNamingTest(FetcherTest): @skipIfNoNetwork() def test_that_directory_exists_for_mirrored_url_and_recipe_url_when_mirroring_is_used(self): self.setup_mirror_rewrite() - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @@ -605,9 +605,9 @@ class GitDownloadDirectoryNamingTest(FetcherTest): @skipIfNoNetwork() def test_that_recipe_directory_and_mirrored_directory_exists_when_mirroring_is_used_and_the_mirrored_directory_already_exists(self): self.setup_mirror_rewrite() - fetcher = bb.fetch.Fetch([self.mirror_url], self.d) + fetcher = bb.fetch2.Fetch([self.mirror_url], self.d) fetcher.download() - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @@ -632,7 +632,7 @@ class TarballNamingTest(FetcherTest): @skipIfNoNetwork() def test_that_the_recipe_tarball_is_created_when_no_mirroring_is_used(self): - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @@ -642,7 +642,7 @@ class TarballNamingTest(FetcherTest): @skipIfNoNetwork() def test_that_the_mirror_tarball_is_created_when_mirroring_is_used(self): self.setup_mirror_rewrite() - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @@ -667,7 +667,7 @@ class GitShallowTarballNamingTest(FetcherTest): @skipIfNoNetwork() def test_that_the_tarball_is_named_after_recipe_url_when_no_mirroring_is_used(self): - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @@ -677,7 +677,7 @@ class GitShallowTarballNamingTest(FetcherTest): @skipIfNoNetwork() def test_that_the_mirror_tarball_is_created_when_mirroring_is_used(self): self.setup_mirror_rewrite() - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @@ -696,7 +696,7 @@ class CleanTarballTest(FetcherTest): @skipIfNoNetwork() def test_that_the_tarball_contents_does_not_leak_info(self): - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @@ -770,7 +770,7 @@ class FetcherLocalTest(FetcherTest): return package_name def fetchUnpack(self, uris): - fetcher = bb.fetch.Fetch(uris, self.d) + fetcher = bb.fetch2.Fetch(uris, self.d) fetcher.download() fetcher.unpack(self.unpackdir) flst = [] @@ -783,7 +783,7 @@ class FetcherLocalTest(FetcherTest): def test_local_checksum_fails_no_file(self): self.d.setVar("SRC_URI", "file://404") with self.assertRaises(bb.BBHandledException): - bb.fetch.get_checksum_file_list(self.d) + bb.fetch2.get_checksum_file_list(self.d) def test_local(self): tree = self.fetchUnpack(['file://a', 'file://dir/c']) @@ -892,7 +892,7 @@ class FetcherLocalTest(FetcherTest): self.d.setVar("SRCREV", "AUTOINC") self.d.setVar("__BBSRCREV_SEEN", "1") url = "git://" + self.gitdir + ";branch=master;protocol=file;" + suffix - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() fetcher.unpack(self.unpackdir) unpack_rev = self.git(['rev-parse', 'HEAD'], @@ -930,7 +930,7 @@ class FetcherNoNetworkTest(FetcherTest): self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz"))) self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done"))) - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() @@ -945,7 +945,7 @@ class FetcherNoNetworkTest(FetcherTest): self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz"))) self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done"))) - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d) fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done"))) @@ -960,7 +960,7 @@ class FetcherNoNetworkTest(FetcherTest): self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz"))) self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done"))) - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/test-file.tar.gz"], self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() # the existing file should not exist or should have be moved to "bad-checksum" @@ -970,7 +970,7 @@ class FetcherNoNetworkTest(FetcherTest): self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz"))) self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done"))) # ssh fetch does not support checksums - fetcher = bb.fetch.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d) # attempts to download with missing donestamp with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() @@ -983,7 +983,7 @@ class FetcherNoNetworkTest(FetcherTest): self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz"))) self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done"))) # ssh fetch does not support checksums - fetcher = bb.fetch.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d) # attempts to download with missing donestamp with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() @@ -998,7 +998,7 @@ class FetcherNoNetworkTest(FetcherTest): self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz"))) self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done"))) # ssh fetch does not support checksums - fetcher = bb.fetch.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d) # should not fetch fetcher.download() # both files should still exist @@ -1013,7 +1013,7 @@ class FetcherNoNetworkTest(FetcherTest): self.assertFalse(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz"))) self.assertTrue(os.path.exists(os.path.join(self.dldir, "test-file.tar.gz.done"))) # ssh fetch does not support checksums - fetcher = bb.fetch.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["ssh://invalid@invalid.yoctoproject.org/test-file.tar.gz"], self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() # both files should still exist @@ -1023,12 +1023,12 @@ class FetcherNoNetworkTest(FetcherTest): class FetcherNetworkTest(FetcherTest): @skipIfNoNetwork() def test_fetch(self): - fetcher = bb.fetch.Fetch(["https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", "https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.1.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", "https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.1.tar.gz"], self.d) fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749) self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.1.tar.gz"), 57892) self.d.setVar("BB_NO_NETWORK", "1") - fetcher = bb.fetch.Fetch(["https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", "https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.1.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", "https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.1.tar.gz"], self.d) fetcher.download() fetcher.unpack(self.unpackdir) self.assertEqual(len(os.listdir(self.unpackdir + "/bitbake-1.0/")), 9) @@ -1037,14 +1037,14 @@ class FetcherNetworkTest(FetcherTest): @skipIfNoNetwork() def test_fetch_mirror(self): self.d.setVar("MIRRORS", "http://.*/.* https://downloads.yoctoproject.org/releases/bitbake") - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749) @skipIfNoNetwork() def test_fetch_mirror_of_mirror(self): self.d.setVar("MIRRORS", "http://.*/.* http://invalid2.yoctoproject.org/ http://invalid2.yoctoproject.org/.* https://downloads.yoctoproject.org/releases/bitbake") - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749) @@ -1052,7 +1052,7 @@ class FetcherNetworkTest(FetcherTest): def test_fetch_file_mirror_of_mirror(self): self.d.setVar("FILESPATH", ".") self.d.setVar("MIRRORS", "http://.*/.* file:///some1where/ file:///some1where/.* file://some2where/ file://some2where/.* https://downloads.yoctoproject.org/releases/bitbake") - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) os.mkdir(self.dldir + "/some2where") fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749) @@ -1060,20 +1060,20 @@ class FetcherNetworkTest(FetcherTest): @skipIfNoNetwork() def test_fetch_premirror(self): self.d.setVar("PREMIRRORS", "http://.*/.* https://downloads.yoctoproject.org/releases/bitbake") - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz"], self.d) fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749) @skipIfNoNetwork() def test_fetch_specify_downloadfilename(self): - fetcher = bb.fetch.Fetch(["https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz;downloadfilename=bitbake-v1.0.0.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz;downloadfilename=bitbake-v1.0.0.tar.gz"], self.d) fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-v1.0.0.tar.gz"), 57749) @skipIfNoNetwork() def test_fetch_premirror_specify_downloadfilename_regex_uri(self): self.d.setVar("PREMIRRORS", "http://.*/.* https://downloads.yoctoproject.org/releases/bitbake/") - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/1.0.tar.gz;downloadfilename=bitbake-1.0.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/1.0.tar.gz;downloadfilename=bitbake-1.0.tar.gz"], self.d) fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749) @@ -1081,7 +1081,7 @@ class FetcherNetworkTest(FetcherTest): # BZ13039 def test_fetch_premirror_specify_downloadfilename_specific_uri(self): self.d.setVar("PREMIRRORS", "http://invalid.yoctoproject.org/releases/bitbake https://downloads.yoctoproject.org/releases/bitbake") - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/1.0.tar.gz;downloadfilename=bitbake-1.0.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/1.0.tar.gz;downloadfilename=bitbake-1.0.tar.gz"], self.d) fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749) @@ -1089,7 +1089,7 @@ class FetcherNetworkTest(FetcherTest): def test_fetch_premirror_use_downloadfilename_to_fetch(self): # Ensure downloadfilename is used when fetching from premirror. self.d.setVar("PREMIRRORS", "http://.*/.* https://downloads.yoctoproject.org/releases/bitbake") - fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.1.tar.gz;downloadfilename=bitbake-1.0.tar.gz"], self.d) + fetcher = bb.fetch2.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.1.tar.gz;downloadfilename=bitbake-1.0.tar.gz"], self.d) fetcher.download() self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749) @@ -1103,14 +1103,14 @@ class FetcherNetworkTest(FetcherTest): self.d.setVar("BB_GENERATE_MIRROR_TARBALLS", "1") self.d.setVar("SRCREV", "270a05b0b4ba0959fe0624d2a4885d7b70426da5") - fetcher = bb.fetch.Fetch([url1], self.d) + fetcher = bb.fetch2.Fetch([url1], self.d) fetcher.download() checkrevision(self, fetcher) # Wipe out the dldir clone and the unpacked source, turn off the network and check mirror tarball works bb.utils.prunedir(self.dldir + "/git2/") bb.utils.prunedir(self.unpackdir) self.d.setVar("BB_NO_NETWORK", "1") - fetcher = bb.fetch.Fetch([url2], self.d) + fetcher = bb.fetch2.Fetch([url2], self.d) fetcher.download() checkrevision(self, fetcher) @@ -1129,7 +1129,7 @@ class FetcherNetworkTest(FetcherTest): def test_gitfetch_badsrcrev(self): # SRCREV is set but does not match rev= parameter url1 = url2 = "git://git.openembedded.org/bitbake;rev=dead05b0b4ba0959fe0624d2a4885d7b70426da5;branch=master;protocol=https" - self.assertRaises(bb.fetch.FetchError, self.gitfetcher, url1, url2) + self.assertRaises(bb.fetch2.FetchError, self.gitfetcher, url1, url2) @skipIfNoNetwork() def test_gitfetch_usehead(self): @@ -1138,7 +1138,7 @@ class FetcherNetworkTest(FetcherTest): # test_local_gitfetch_usehead() for a positive use of the usehead # feature. url = "git://git.openembedded.org/bitbake;usehead=1;branch=master;protocol=https" - self.assertRaises(bb.fetch.ParameterError, self.gitfetcher, url, url) + self.assertRaises(bb.fetch2.ParameterError, self.gitfetcher, url, url) @skipIfNoNetwork() def test_gitfetch_usehead_withname(self): @@ -1147,7 +1147,7 @@ class FetcherNetworkTest(FetcherTest): # test_local_gitfetch_usehead() for a positive use of the usehead # feature. url = "git://git.openembedded.org/bitbake;usehead=1;name=newName;branch=master;protocol=https" - self.assertRaises(bb.fetch.ParameterError, self.gitfetcher, url, url) + self.assertRaises(bb.fetch2.ParameterError, self.gitfetcher, url, url) @skipIfNoNetwork() def test_gitfetch_finds_local_tarball_for_mirrored_url_when_previous_downloaded_by_the_recipe_url(self): @@ -1178,7 +1178,7 @@ class FetcherNetworkTest(FetcherTest): url = "gitsm://git.yoctoproject.org/git-submodule-test;branch=ssh-gitsm-tests;rev=049da4a6cb198d7c0302e9e8b243a1443cb809a7;branch=master;protocol=https" # Original URL (comment this if you have ssh access to git.yoctoproject.org) url = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master;rev=38e61644af90dccd73c03ed3acaed98c8dda9294;branch=master;protocol=https" - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted os.chdir(os.path.dirname(self.unpackdir)) @@ -1203,13 +1203,13 @@ class FetcherNetworkTest(FetcherTest): dl_premirror = os.path.join(tempdir, "download-premirror") os.mkdir(dl_premirror) self.d.setVar("DL_DIR", dl_premirror) - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() # now use the premirror in restricted network self.d.setVar("DL_DIR", self.dldir) self.d.setVar("PREMIRRORS", "gitsm://.*/.* gitsm://%s/git2/MIRRORNAME;protocol=file" % dl_premirror) self.d.setVar("BB_ALLOWED_NETWORKS", "*.some.domain") - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() @skipIfNoNetwork() @@ -1217,7 +1217,7 @@ class FetcherNetworkTest(FetcherTest): # The following external repositories have show failures in fetch and unpack operations # We want to avoid regressions! url = "gitsm://github.com/bus1/dbus-broker;protocol=https;rev=fc874afa0992d0c75ec25acb43d344679f0ee7d2;branch=main" - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted os.chdir(os.path.dirname(self.unpackdir)) @@ -1233,7 +1233,7 @@ class FetcherNetworkTest(FetcherTest): @skipIfNoNetwork() def test_git_submodule_CLI11(self): url = "gitsm://github.com/CLIUtils/CLI11;protocol=https;rev=bd4dc911847d0cde7a6b41dfa626a85aab213baf;branch=main" - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted os.chdir(os.path.dirname(self.unpackdir)) @@ -1248,12 +1248,12 @@ class FetcherNetworkTest(FetcherTest): def test_git_submodule_update_CLI11(self): """ Prevent regression on update detection not finding missing submodule, or modules without needed commits """ url = "gitsm://github.com/CLIUtils/CLI11;protocol=https;rev=cf6a99fa69aaefe477cc52e3ef4a7d2d7fa40714;branch=main" - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() # CLI11 that pulls in a newer nlohmann-json url = "gitsm://github.com/CLIUtils/CLI11;protocol=https;rev=49ac989a9527ee9bb496de9ded7b4872c2e0e5ca;branch=main" - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted os.chdir(os.path.dirname(self.unpackdir)) @@ -1267,7 +1267,7 @@ class FetcherNetworkTest(FetcherTest): @skipIfNoNetwork() def test_git_submodule_aktualizr(self): url = "gitsm://github.com/advancedtelematic/aktualizr;branch=master;protocol=https;rev=d00d1a04cc2366d1a5f143b84b9f507f8bd32c44" - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted os.chdir(os.path.dirname(self.unpackdir)) @@ -1287,7 +1287,7 @@ class FetcherNetworkTest(FetcherTest): # This repository also has submodules where the module (name), path and url do not align url = "gitsm://github.com/azure/iotedge.git;protocol=https;rev=d76e0316c6f324345d77c48a83ce836d09392699;branch=main" - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted os.chdir(os.path.dirname(self.unpackdir)) @@ -1314,7 +1314,7 @@ class FetcherNetworkTest(FetcherTest): self.recipe_url = "gitsm://github.com/gflags/gflags.git;protocol=https;branch=master" self.d.setVar("SRCREV", "14e1138441bbbb584160cb1c0a0426ec1bac35f1") with Timeout(60): - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) with self.assertRaises(bb.fetch2.FetchError): fetcher.download() @@ -1374,7 +1374,7 @@ class SVNTest(FetcherTest): def test_noexternal_svn(self): # Always match the rev count from setUp (currently rev 2) url = "svn://%s;module=trunk;protocol=file;rev=2" % self.repo_url.replace('file://', '') - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() os.chdir(os.path.dirname(self.unpackdir)) fetcher.unpack(self.unpackdir) @@ -1388,7 +1388,7 @@ class SVNTest(FetcherTest): def test_external_svn(self): # Always match the rev count from setUp (currently rev 2) url = "svn://%s;module=trunk;protocol=file;externals=allowed;rev=2" % self.repo_url.replace('file://', '') - fetcher = bb.fetch.Fetch([url], self.d) + fetcher = bb.fetch2.Fetch([url], self.d) fetcher.download() os.chdir(os.path.dirname(self.unpackdir)) fetcher.unpack(self.unpackdir) @@ -1403,43 +1403,43 @@ class TrustedNetworksTest(FetcherTest): # Ensure trusted_network returns False when the host IS in the list. url = "git://Someserver.org/foo;rev=1;branch=master" self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org someserver.org server2.org server3.org") - self.assertTrue(bb.fetch.trusted_network(self.d, url)) + self.assertTrue(bb.fetch2.trusted_network(self.d, url)) def test_wild_trusted_network(self): # Ensure trusted_network returns true when the *.host IS in the list. url = "git://Someserver.org/foo;rev=1;branch=master" self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org") - self.assertTrue(bb.fetch.trusted_network(self.d, url)) + self.assertTrue(bb.fetch2.trusted_network(self.d, url)) def test_prefix_wild_trusted_network(self): # Ensure trusted_network returns true when the prefix matches *.host. url = "git://git.Someserver.org/foo;rev=1;branch=master" self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org") - self.assertTrue(bb.fetch.trusted_network(self.d, url)) + self.assertTrue(bb.fetch2.trusted_network(self.d, url)) def test_two_prefix_wild_trusted_network(self): # Ensure trusted_network returns true when the prefix matches *.host. url = "git://something.git.Someserver.org/foo;rev=1;branch=master" self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org") - self.assertTrue(bb.fetch.trusted_network(self.d, url)) + self.assertTrue(bb.fetch2.trusted_network(self.d, url)) def test_port_trusted_network(self): # Ensure trusted_network returns True, even if the url specifies a port. url = "git://someserver.org:8080/foo;rev=1;branch=master" self.d.setVar("BB_ALLOWED_NETWORKS", "someserver.org") - self.assertTrue(bb.fetch.trusted_network(self.d, url)) + self.assertTrue(bb.fetch2.trusted_network(self.d, url)) def test_untrusted_network(self): # Ensure trusted_network returns False when the host is NOT in the list. url = "git://someserver.org/foo;rev=1;branch=master" self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org server2.org server3.org") - self.assertFalse(bb.fetch.trusted_network(self.d, url)) + self.assertFalse(bb.fetch2.trusted_network(self.d, url)) def test_wild_untrusted_network(self): # Ensure trusted_network returns False when the host is NOT in the list. url = "git://*.someserver.org/foo;rev=1;branch=master" self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org server2.org server3.org") - self.assertFalse(bb.fetch.trusted_network(self.d, url)) + self.assertFalse(bb.fetch2.trusted_network(self.d, url)) class URLHandle(unittest.TestCase): # Quote password as per RFC3986 @@ -1462,12 +1462,12 @@ class URLHandle(unittest.TestCase): def test_decodeurl(self): for k, v in self.decodedata.items(): - result = bb.fetch.decodeurl(k) + result = bb.fetch2.decodeurl(k) self.assertEqual(result, v) def test_encodeurl(self): for k, v in self.datatable.items(): - result = bb.fetch.encodeurl(v) + result = bb.fetch2.encodeurl(v) if result.startswith("file:"): result = urllib.parse.unquote(result) self.assertEqual(result, k) @@ -2278,7 +2278,7 @@ class GitShallowTest(FetcherTest): premirror = os.path.join(self.tempdir, "premirror") os.mkdir(premirror) d.setVar("DL_DIR", premirror) - fetcher = bb.fetch.Fetch([url], d) + fetcher = bb.fetch2.Fetch([url], d) fetcher.download() # set PREMIRRORS @@ -2286,7 +2286,7 @@ class GitShallowTest(FetcherTest): # set DL_DIR back and use the same url multiple times to fetch d.setVar("DL_DIR", self.dldir) - fetcher2 = bb.fetch.Fetch([url, url], d) + fetcher2 = bb.fetch2.Fetch([url, url], d) fetcher2.download() def test_shallow_invalid_depth(self): @@ -2830,7 +2830,7 @@ class GitURLWithSpacesTest(FetcherTest): for test_git_url, ref in self.test_git_urls.items(): - fetcher = bb.fetch.Fetch([test_git_url], self.d) + fetcher = bb.fetch2.Fetch([test_git_url], self.d) ud = fetcher.ud[fetcher.urls[0]] self.assertEqual(ud.url, ref['url']) @@ -3016,7 +3016,7 @@ class NPMTest(FetcherTest): urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3033,7 +3033,7 @@ class NPMTest(FetcherTest): ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] # Fetch once to get a tarball - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3054,7 +3054,7 @@ class NPMTest(FetcherTest): ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] # Fetch once to get a tarball - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3074,7 +3074,7 @@ class NPMTest(FetcherTest): # while the fetcher object exists, which it does when we rename the # download directory to "mirror" above. Thus we need a new fetcher to go # with the now empty download directory. - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3086,7 +3086,7 @@ class NPMTest(FetcherTest): ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] # Fetch once to get a tarball - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3109,7 +3109,7 @@ class NPMTest(FetcherTest): urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3137,7 +3137,7 @@ class NPMTest(FetcherTest): ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223' ';destsuffix=foo/bar;downloadfilename=foo-bar.tgz'] - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'foo-bar.tgz'))) fetcher.unpack(self.unpackdir) @@ -3150,7 +3150,7 @@ class NPMTest(FetcherTest): ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] self.d.setVar('BB_NO_NETWORK', '1') - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() @@ -3161,7 +3161,7 @@ class NPMTest(FetcherTest): ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] # Fetch once to get a tarball - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) fetcher.download() # Disable network access self.d.setVar('BB_NO_NETWORK', '1') @@ -3177,7 +3177,7 @@ class NPMTest(FetcherTest): urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=1.0.0' ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) fetcher.download() fetcher.unpack(self.unpackdir) unpackdir = os.path.join(self.unpackdir, 'npm') @@ -3187,7 +3187,7 @@ class NPMTest(FetcherTest): def test_npm_version_latest_rejected(self): url = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=latest'] with self.assertRaises(bb.fetch2.ParameterError): - bb.fetch.Fetch(url, self.d) + bb.fetch2.Fetch(url, self.d) @skipIfNoNpm() @skipIfNoNetwork() @@ -3195,7 +3195,7 @@ class NPMTest(FetcherTest): urls = ['npm://registry.invalid.org;package=@savoirfairelinux/node-server-example;version=1.0.0' ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) with self.assertRaises(bb.fetch2.FetchError): fetcher.download() @@ -3205,7 +3205,7 @@ class NPMTest(FetcherTest): urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/invalid;version=1.0.0' ';sha512sum=f2dd7d88cb9a129fbb97eb87a8b5103bab24f783420fd7587f8000a355a12bf7' '83f1263230afc588123958b73e36bb241f63eaf08119aac5aa2a870bc4de9223'] - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) with self.assertRaises(bb.fetch2.FetchError): fetcher.download() @@ -3214,7 +3214,7 @@ class NPMTest(FetcherTest): def test_npm_version_invalid(self): urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example;version=invalid'] with self.assertRaises(bb.fetch2.ParameterError): - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) @skipIfNoNpm() @skipIfNoNetwork() @@ -3237,7 +3237,7 @@ class NPMTest(FetcherTest): checksum_name, hexsum = npm_integrity(integrity) urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example' ';version=1.0.0;%s=%s' % (checksum_name, hexsum)] - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3248,7 +3248,7 @@ class NPMTest(FetcherTest): """A wrong sha512sum param in SRC_URI causes the fetch to fail.""" urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example' ';version=1.0.0;sha512sum=deadbeef00'] - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) with self.assertRaises(bb.fetch2.FetchError): fetcher.download() @@ -3268,28 +3268,28 @@ class NPMTest(FetcherTest): else: self.d.setVar('BB_STRICT_CHECKSUM', strict) with self.assertRaises(bb.fetch2.MissingParameterError): - bb.fetch.Fetch(urls, self.d) + bb.fetch2.Fetch(urls, self.d) @skipIfNoNpm() @skipIfNoNetwork() def test_npm_registry_none(self): urls = ['npm://;package=@savoirfairelinux/node-server-example;version=1.0.0'] with self.assertRaises(bb.fetch2.MalformedUrl): - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) @skipIfNoNpm() @skipIfNoNetwork() def test_npm_package_none(self): urls = ['npm://registry.npmjs.org;version=1.0.0'] with self.assertRaises(bb.fetch2.MissingParameterError): - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) @skipIfNoNpm() @skipIfNoNetwork() def test_npm_version_none(self): urls = ['npm://registry.npmjs.org;package=@savoirfairelinux/node-server-example'] with self.assertRaises(bb.fetch2.MissingParameterError): - fetcher = bb.fetch.Fetch(urls, self.d) + fetcher = bb.fetch2.Fetch(urls, self.d) def create_shrinkwrap_file(self, data): import json @@ -3325,7 +3325,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz'))) self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz'))) @@ -3345,7 +3345,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'github.com.jshttp.cookie.git'))) @@ -3367,12 +3367,12 @@ class NPMTest(FetcherTest): } }) # Fetch with dev disabled - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz'))) self.assertFalse(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz'))) # Fetch with dev enabled - fetcher = bb.fetch.Fetch(['npmsw://' + swfile + ';dev=1'], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile + ';dev=1'], self.d) fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz'))) self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz'))) @@ -3388,7 +3388,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile + ';destsuffix=foo/bar'], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile + ';destsuffix=foo/bar'], self.d) fetcher.download() fetcher.unpack(self.unpackdir) self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'foo', 'bar', 'node_modules', 'array-flatten', 'package.json'))) @@ -3404,7 +3404,7 @@ class NPMTest(FetcherTest): } }) self.d.setVar('BB_NO_NETWORK', '1') - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() @@ -3412,7 +3412,7 @@ class NPMTest(FetcherTest): @skipIfNoNetwork() def test_npmsw_no_network_with_tarball(self): # Fetch once to get a tarball - fetcher = bb.fetch.Fetch(['npm://registry.npmjs.org;package=array-flatten;version=1.1.1;sha1sum=9a5f699051b1e7073328f2a008968b64ea2955d2'], self.d) + fetcher = bb.fetch2.Fetch(['npm://registry.npmjs.org;package=array-flatten;version=1.1.1;sha1sum=9a5f699051b1e7073328f2a008968b64ea2955d2'], self.d) fetcher.download() # Disable network access self.d.setVar('BB_NO_NETWORK', '1') @@ -3426,7 +3426,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() fetcher.unpack(self.unpackdir) self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'package.json'))) @@ -3443,12 +3443,12 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() # Disable network access self.d.setVar('BB_NO_NETWORK', '1') # Fetch again with npm - fetcher = bb.fetch.Fetch(['npm://registry.npmjs.org;package=array-flatten;version=1.1.1;sha1sum=9a5f699051b1e7073328f2a008968b64ea2955d2'], self.d) + fetcher = bb.fetch2.Fetch(['npm://registry.npmjs.org;package=array-flatten;version=1.1.1;sha1sum=9a5f699051b1e7073328f2a008968b64ea2955d2'], self.d) fetcher.download() fetcher.unpack(self.unpackdir) self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'npm', 'package.json'))) @@ -3465,7 +3465,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) with self.assertRaises(bb.fetch2.FetchError): fetcher.download() # Fetch correctly to get a tarball @@ -3478,7 +3478,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() localpath = os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz') self.assertTrue(os.path.exists(localpath)) @@ -3496,7 +3496,7 @@ class NPMTest(FetcherTest): @skipIfNoNetwork() def test_npmsw_premirrors(self): # Fetch once to get a tarball - fetcher = bb.fetch.Fetch(['npm://registry.npmjs.org;package=array-flatten;version=1.1.1;sha1sum=9a5f699051b1e7073328f2a008968b64ea2955d2'], self.d) + fetcher = bb.fetch2.Fetch(['npm://registry.npmjs.org;package=array-flatten;version=1.1.1;sha1sum=9a5f699051b1e7073328f2a008968b64ea2955d2'], self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3517,7 +3517,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3525,7 +3525,7 @@ class NPMTest(FetcherTest): @skipIfNoNetwork() def test_npmsw_mirrors(self): # Fetch once to get a tarball - fetcher = bb.fetch.Fetch(['npm://registry.npmjs.org;package=array-flatten;version=1.1.1;sha1sum=9a5f699051b1e7073328f2a008968b64ea2955d2'], self.d) + fetcher = bb.fetch2.Fetch(['npm://registry.npmjs.org;package=array-flatten;version=1.1.1;sha1sum=9a5f699051b1e7073328f2a008968b64ea2955d2'], self.d) ud = fetcher.ud[fetcher.urls[0]] fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3545,7 +3545,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) @@ -3566,7 +3566,7 @@ class NPMTest(FetcherTest): } } }) - fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) + fetcher = bb.fetch2.Fetch(['npmsw://' + swfile], self.d) fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'array-flatten-1.1.1.tgz'))) self.assertFalse(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz'))) @@ -3580,7 +3580,7 @@ class GitSharedTest(FetcherTest): @skipIfNoNetwork() def test_shared_unpack(self): - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() fetcher.unpack(self.unpackdir) @@ -3591,7 +3591,7 @@ class GitSharedTest(FetcherTest): def test_noshared_unpack(self): self.d.setVar('BB_GIT_NOSHARED', '1') self.unpackdir += '_noshared' - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() fetcher.unpack(self.unpackdir) @@ -3603,14 +3603,14 @@ class GitTagVerificationTests(FetcherTest): @skipIfNoNetwork() def test_tag_rev_match(self): # Test a url with rev= and tag= set works - fetcher = bb.fetch.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.12.0"], self.d) + fetcher = bb.fetch2.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.12.0"], self.d) fetcher.download() fetcher.unpack(self.unpackdir) def test_annotated_tag_rev_match(self): # Test a url with rev= and tag= set works # rev is the annotated tag revision in this case - fetcher = bb.fetch.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=fa30183549bd09f33fd4eebf56771ca5393526a6;tag=2.12.0"], self.d) + fetcher = bb.fetch2.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=fa30183549bd09f33fd4eebf56771ca5393526a6;tag=2.12.0"], self.d) fetcher.download() fetcher.unpack(self.unpackdir) @@ -3618,7 +3618,7 @@ class GitTagVerificationTests(FetcherTest): def test_tag_rev_match2(self): # Test a url with SRCREV and tag= set works self.d.setVar('SRCREV', '5b4e20377eea8d428edf1aeb2187c18f82ca6757') - fetcher = bb.fetch.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;tag=2.12.0"], self.d) + fetcher = bb.fetch2.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;tag=2.12.0"], self.d) fetcher.download() fetcher.unpack(self.unpackdir) @@ -3626,7 +3626,7 @@ class GitTagVerificationTests(FetcherTest): def test_tag_rev_match3(self): # Test a url with SRCREV, rev= and tag= set works self.d.setVar('SRCREV', '5b4e20377eea8d428edf1aeb2187c18f82ca6757') - fetcher = bb.fetch.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.12.0"], self.d) + fetcher = bb.fetch2.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.12.0"], self.d) fetcher.download() fetcher.unpack(self.unpackdir) @@ -3635,14 +3635,14 @@ class GitTagVerificationTests(FetcherTest): # Test a url with SRCREV and rev= mismatching errors self.d.setVar('SRCREV', 'bade540fc31a1c26839efd2c7785a751ce24ebfb') with self.assertRaises(bb.fetch2.FetchError): - fetcher = bb.fetch.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.12.0"], self.d) + fetcher = bb.fetch2.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.12.0"], self.d) @skipIfNoNetwork() def test_tag_rev_match5(self): # Test a url with SRCREV, rev= and tag= set works when using shallow clones self.d.setVar('BB_GIT_SHALLOW', '1') self.d.setVar('SRCREV', '5b4e20377eea8d428edf1aeb2187c18f82ca6757') - fetcher = bb.fetch.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.12.0"], self.d) + fetcher = bb.fetch2.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.12.0"], self.d) fetcher.download() fetcher.unpack(self.unpackdir) @@ -3650,7 +3650,7 @@ class GitTagVerificationTests(FetcherTest): def test_tag_rev_match6(self): # Test a url with SRCREV, rev= and a mismatched tag= when using shallow clones self.d.setVar('BB_GIT_SHALLOW', '1') - fetcher = bb.fetch.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.8.0"], self.d) + fetcher = bb.fetch2.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.8.0"], self.d) fetcher.download() with self.assertRaises(bb.fetch2.FetchError): fetcher.unpack(self.unpackdir) @@ -3659,7 +3659,7 @@ class GitTagVerificationTests(FetcherTest): def test_tag_rev_match7(self): # Test a url with SRCREV, rev= and a mismatched tag= self.d.setVar('SRCREV', '5b4e20377eea8d428edf1aeb2187c18f82ca6757') - fetcher = bb.fetch.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.8.0"], self.d) + fetcher = bb.fetch2.Fetch(["git://git.openembedded.org/bitbake;branch=2.12;protocol=https;rev=5b4e20377eea8d428edf1aeb2187c18f82ca6757;tag=2.8.0"], self.d) fetcher.download() with self.assertRaises(bb.fetch2.FetchError): fetcher.unpack(self.unpackdir) @@ -3711,17 +3711,17 @@ class FetchPremirroronlyLocalTest(FetcherTest): def test_mirror_multiple_fetches(self): self.make_git_repo() self.d.setVar("SRCREV", self.git_new_commit()) - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() fetcher.unpack(self.unpackdir) ## New commit in premirror. it's not in the download_dir self.d.setVar("SRCREV", self.git_new_commit()) - fetcher2 = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher2 = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher2.download() fetcher2.unpack(self.unpackdir) ## New commit in premirror. it's not in the download_dir self.d.setVar("SRCREV", self.git_new_commit()) - fetcher3 = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher3 = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher3.download() fetcher3.unpack(self.unpackdir) @@ -3729,20 +3729,20 @@ class FetchPremirroronlyLocalTest(FetcherTest): def test_mirror_commit_nonexistent(self): self.make_git_repo() self.d.setVar("SRCREV", "0"*40) - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() def test_mirror_commit_exists(self): self.make_git_repo() self.d.setVar("SRCREV", self.git_new_commit()) - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() fetcher.unpack(self.unpackdir) def test_mirror_tarball_nonexistent(self): self.d.setVar("SRCREV", "0"*40) - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() @@ -3775,7 +3775,7 @@ class FetchPremirroronlyNetworkTest(FetcherTest): self.make_git_repo() ## Upstream commit is in the mirror self.d.setVar("SRCREV", "15413486df1f5a5b5af699b6f3ba5f0984e52a9f") - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() @skipIfNoNetwork() @@ -3783,7 +3783,7 @@ class FetchPremirroronlyNetworkTest(FetcherTest): self.make_git_repo() ## Upstream commit not in the mirror self.d.setVar("SRCREV", "49d65d53c2bf558ae6e9185af0f3af7b79d255ec") - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) with self.assertRaises(bb.fetch2.NetworkAccess): fetcher.download() @@ -3811,7 +3811,7 @@ class FetchPremirroronlyMercurialTest(FetcherTest): Ask bitbake to download repo and prepare mirror tarball for us """ self.d.setVar("BB_GENERATE_MIRROR_TARBALLS", "1") - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() mirrorfile = os.path.join(self.d.getVar("DL_DIR"), self.mirrorname) self.assertTrue(os.path.exists(mirrorfile), "Mirror tarball {} has not been created".format(mirrorfile)) @@ -3827,7 +3827,7 @@ class FetchPremirroronlyMercurialTest(FetcherTest): self.d.setVar("PREMIRRORS", self.recipe_url + " " + "file://{}".format(self.mirrordir) + " \n") self.d.setVar("BB_FETCH_PREMIRRORONLY", "1") self.d.setVar("BB_NO_NETWORK", "1") - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) fetcher.download() class FetchPremirroronlyBrokenTarball(FetcherTest): @@ -3848,7 +3848,7 @@ class FetchPremirroronlyBrokenTarball(FetcherTest): def test_mirror_broken_download(self): self.d.setVar("SRCREV", "0"*40) - fetcher = bb.fetch.Fetch([self.recipe_url], self.d) + fetcher = bb.fetch2.Fetch([self.recipe_url], self.d) with self.assertRaises(bb.fetch2.FetchError), self.assertLogs() as logs: fetcher.download() output = "".join(logs.output) From patchwork Fri Aug 21 17:06:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "chris.laplante@agilent.com" X-Patchwork-Id: 96017 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 D6CA7C5DF97 for ; Fri, 21 Aug 2026 17:07:08 +0000 (UTC) Received: from SN4PR2101CU001.outbound.protection.outlook.com (SN4PR2101CU001.outbound.protection.outlook.com [40.93.195.21]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.16.1787332021007049095 for ; Fri, 21 Aug 2026 10:07:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=JVDMApRs; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: agilent.com, ip: 40.93.195.21, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SJkD1mjwlRTD0hMaw1ld9Z2eTxCeQgTUNL/lLak92wJgQ5TBKH1KwfLshnxP+7rmIsaAfInTUH80yD+yEpLstDks1ZrO5uNb2VDlbRUK58miTTPi/KquLCL670KtEEpoWnmJIDZA0vf08769era28uVgY7uGZvJ4GaTqQR54VqYKLJwH434+UEgMfZafRbkCNBRUl8B+vAZQoyM9GwSWt1PN0tKHksJNCOfEDEuJ0OHZq10w5OFui8XZkzgf83WMQdkymeS1q3MDPM4OACsJbg+bw9m7IssWhxP3SQvf9jEQfgkEYilPO3ONuvKjhKAUS+TeTdhVQtdNZBLqRMhWLQ== 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=IT97SM6UpPzIp5VerE0qA2dA3lI0cp3o6/K2THgCK40=; b=hIdHtt4cVIMVn2242OyZdZM+XEaBAWQ7vKS7GYCwXyzZkFfoGkMVG1Qq5wTmiR55JWtuZCueUjte4d5nM+2Ck8vCmnbtvfrtQH96/2W/uToS22xAv5aUbGeBgx7KAHm9XwtBxuIxHsCS+nrAaogPT2TPiEUWzDWH/vVIrbcDklEUFz5lAnn4x0CpgSYa3dXxqx9xW1hIRICVwzwu/q6yv2wlBeKjJDhp+iHOT/JGnhW0cZDQxietGsm/XFAiKxWlR81Tso3hAks83jM5rz++MM8SKaHyuoYdLd68IrPa8Ldk+EJhpzv13QuzoikkpfqTUySU7RHeoD6llL5uIXbq6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.25.218.36) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=agilent.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=agilent.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agilent.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IT97SM6UpPzIp5VerE0qA2dA3lI0cp3o6/K2THgCK40=; b=JVDMApRs8C0W9JIw4ZRFHV8gMs4JFLtDdEiiYZb2hufQhNMCF1Ksim8bt8CVObxPJ4ZSjI2UEU6Re53ox4JY6zL9Wu/6nM7Tz6TDY3IcBFC3/WlvY9DIl0Uk/+sfBQvjQBYcivs7hGm5YNfxUX4tp2klg66IvqQ5ng9gpy3AZki9jMQLpWyL2ObDRX6gQ8KFDn7T7lzqzRHxnGY8+YjES2h+p7hGS0pHyxtpfdTKCPX4FQcOeEA4MdrHl0EGiMr7C1SfCoEt96sCmjDYbnBkz+sWFKf9m8PR3PQBSQ3CkBldKzhaAStg+N4GKNCc5wO9EjT53GgpY5VEByDdkssSrA== Received: from BN9PR03CA0674.namprd03.prod.outlook.com (2603:10b6:408:10e::19) by MW4PR12MB6898.namprd12.prod.outlook.com (2603:10b6:303:207::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.315.12; Fri, 21 Aug 2026 17:06:56 +0000 Received: from BL02EPF0002992A.namprd02.prod.outlook.com (2603:10b6:408:10e:cafe::85) by BN9PR03CA0674.outlook.office365.com (2603:10b6:408:10e::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.339.11 via Frontend Transport; Fri, 21 Aug 2026 17:06:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.25.218.36) smtp.mailfrom=agilent.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=agilent.com; Received-SPF: Pass (protection.outlook.com: domain of agilent.com designates 192.25.218.36 as permitted sender) receiver=protection.outlook.com; client-ip=192.25.218.36; helo=wpcosapexchedg5.windmz.agilent.com; pr=C Received: from wpcosapexchedg5.windmz.agilent.com (192.25.218.36) by BL02EPF0002992A.mail.protection.outlook.com (10.167.249.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.360.3 via Frontend Transport; Fri, 21 Aug 2026 17:06:56 +0000 Received: from laplante-B650.lfs.agilent.com (192.25.126.4) by edgeappmail.agilent.com (192.25.218.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Fri, 21 Aug 2026 11:06:41 -0600 From: To: CC: Chris Laplante Subject: [PATCH 3/3] lib: remove bb.fetch shim module; cleanup fallout Date: Fri, 21 Aug 2026 13:06:24 -0400 Message-ID: <20260821170624.436725-4-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260821170624.436725-1-chris.laplante@agilent.com> References: <20260821170624.436725-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0002992A:EE_|MW4PR12MB6898:EE_ X-MS-Office365-Filtering-Correlation-Id: 225b9d58-e19e-4c04-1bd9-08deffa69b04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|23010399003|376014|1800799024|18002099003|56012099006|22082099003|3023799007|11063799006|10067099003|6133799003; X-Microsoft-Antispam-Message-Info: 6EcCCrqamM5ZWt7hjlYFWg+jWn07nFKnSqznVVF7Utg1X/cIymOj+GxU5z0epwnCh+mr+2uIS8Da9pbS8F4xzfL3S/3rAD2YxA6N4uXby97JBqz817ve5WnZh8mLrlV6fIzrlYeiZmqZmdzctsEWTwneAJ2auRLm9U5VcwpcDuGGGacTGsDrdt/ynxmvFIGXr0QGoBOTBRWDF7mP6Ss22SUA7duXl6QoQEfLlCzS42aIuCcgoWOyeFpejCR3kVLHqsxgSl8k8ht5yBHwAMOxUdYj9ui5h23c44E+YV8LrSjNMViE/Gu6v833idnsHPm/I4mX7IKMFQDVgpCiRNb6A+OFFHijUkdnZaUDsDxPfbAIfN1Q8N7VSm7XyQp8emWLoAjMayZH76+IWYbVQnmxcFr3GnB1cYY9OzBRE5khLwDGrKurG/qkDm9V9oEDN/tJtnGbAs22a+M/yE2CZkHF49TO2VOKSby431mVd28yGV6HWcMf+8JXXpoCOZcKTMNeIwoZqNHLZv15Wlkm+ZwuWI1YgLcgDwyZYGoj18HRNw9dn0CMLpa1puxwrzOvrizzibtn817QseNbSF47HmYVJgv7YhQcLAH6rztS0+FXOdtVuPZsoTZPXiAV6Bur98F/9zxoNEIsz/XTaEEzqKvNYwFBHuXYsz5RJ/qfRRndy8HoqhD1U77wa0dbxk94oquNuorffWncQfyBI3bKPyJa6A== X-Forefront-Antispam-Report: CIP:192.25.218.36;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:wpcosapexchedg5.windmz.agilent.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(23010399003)(376014)(1800799024)(18002099003)(56012099006)(22082099003)(3023799007)(11063799006)(10067099003)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gf6WckT6bCQd7hWRHDjLBP+z93dIPesJvkmlfCwzO5olHiHZEvfWcDgqlJhsnbFLy5QgIeP5hxXSPa5TeXmO+th5eDfVTYo5vUCh4+Tlffd8NY0zdw9GwxoH3o1b7fjgm0hbnjLp7XXHycvCUaggQFrwV1lVpsRx3Uitg76pGfwolGkRdH/TOTX8ynGYMKlOpo1CP6QrCFHwD2wZu0ZqLcPhEAgk4b6Uq+Hrf2gFpb5sLVJWPtDMeuDornNF+3z5jyXsu8WTtAy+X5XGpCjxRV48lzeeCp+Zq4X2KLoc1v6/CFqLBISQ6PchnsUm4rh8DP/8BNxCXIETyDb6GwMwB6PfKLBjLciyc8fs+uJyAfzXr/HFOdZ7qa3PhREg/4bZ0ct4AR9A6XToT+OlagzH+sQpwE4d7Lfp14MKnWB3OqFQh9Pq0iaAG+LhyrQzgg2w X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2026 17:06:56.2348 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 225b9d58-e19e-4c04-1bd9-08deffa69b04 X-MS-Exchange-CrossTenant-Id: a9c0bc09-8b46-4206-9351-2ba12fb4a5c0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a9c0bc09-8b46-4206-9351-2ba12fb4a5c0;Ip=[192.25.218.36];Helo=[wpcosapexchedg5.windmz.agilent.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BL02EPF0002992A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6898 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 21 Aug 2026 17:07:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/20010 From: Chris Laplante fetch2 replaced fetch a long time ago (2012) so I argue it is time to say goodbye the bb.fetch shim. In doing so, we reveal and cleanup a few circular imports and transitive imports that must now be explicit. Signed-off-by: Chris Laplante --- lib/bb/__init__.py | 4 +--- lib/bb/build.py | 2 +- lib/bb/cookerdata.py | 11 +++++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py index bc5e9d82b..049c87ef0 100644 --- a/lib/bb/__init__.py +++ b/lib/bb/__init__.py @@ -90,6 +90,7 @@ class BBLoggerMixin(object): return self.bbdebug(3, *args, **kwargs) def bbdebug(self, level, msg, *args, **kwargs): + import bb.event loglevel = logging.DEBUG - level + 1 if not bb.event.worker_pid: if self.name in bb.msg.loggerDefaultDomains and loglevel > (bb.msg.loggerDefaultDomains[self.name]): @@ -152,9 +153,6 @@ class PrefixLoggerAdapter(logging.LoggerAdapter): # can result in construction of the various loggers. import bb.msg -from bb import fetch2 as fetch -sys.modules['bb.fetch'] = sys.modules['bb.fetch2'] - # Messaging convenience functions def plain(*args): """ diff --git a/lib/bb/build.py b/lib/bb/build.py index 40839a81b..8b49721d6 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -24,7 +24,6 @@ import datetime import bb import bb.msg import bb.process -import bb.progress from io import StringIO from bb import data, event, utils @@ -387,6 +386,7 @@ esac ''' def create_progress_handler(func, progress, logfile, d): + import bb.progress if progress == 'percent': # Use default regex return bb.progress.BasicProgressHandler(d, outfile=logfile) diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py index c5fcd71be..eedfd5406 100644 --- a/lib/bb/cookerdata.py +++ b/lib/bb/cookerdata.py @@ -16,9 +16,16 @@ import re import sys import hashlib from functools import wraps -import bb -from bb import data + +import bb.cache +import bb.codeparser +import bb.data +import bb.data +import bb.data_smart +import bb.event +import bb.fetch2 import bb.parse +import bb.utils logger = logging.getLogger("BitBake") parselog = logging.getLogger("BitBake.Parsing")