From patchwork Mon Dec 9 10:31:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herbrechtsmeier X-Patchwork-Id: 53813 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 7A417E77180 for ; Mon, 9 Dec 2024 10:32:31 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.108]) by mx.groups.io with SMTP id smtpd.web11.98025.1733740340477353303 for ; Mon, 09 Dec 2024 02:32:21 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@weidmueller.com header.s=selector2 header.b=PA0NEwNF; spf=pass (domain: weidmueller.com, ip: 40.107.162.108, mailfrom: stefan.herbrechtsmeier-oss@weidmueller.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wGaAth8D+l5Tu7UkdCUrDNNimAKhga/US5Ici1zjOSA3gGHHJVwIHx9b1Ou88MpBUwi39fNil2tZdmsEtYEdXliiuLybYB6BpKg1+EX54nJGktv7+dm10BzyFZlNrqTQ1aRRPcgtjCKuEGnXECp3SuyJF4yUcMpi/XydFnAer66JjK6zmffwyOfDDxrrBXEiNGkG5xrteLocDc2cRE/OaHqfIrnCqnYLwmvUDU9TopwKqYE61v7RW3RFPGKlrmclUEPNhtBlsIP1r54LfkJ8+QRx6F0qe5U8E+RhXvJ0HNINCfdrv4Ss4sWSyQWiX6GbR++bxdQs+Q4m/rvih858Ew== 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=mblQIwKid27UqOCLTUN4f5pe9qZRosvcI/KOOFDQGyI=; b=wmGxuielDIzr8I7EvnQRM8SuYwefOwauMMNCHhg7vrkgzOCYR2j3ck/ARfPJ+xlPHSqYc0UBs5HvYZ5vP8NN3v7uQNQngulas0H9njkQPgiboEM4H2ZGcZ7TAufLnAli57GoMEHnhFOIiupktwbpYqRWVDD/fu6bUbg3nY8SohK+4//N+P1fwXVye2XyXRxSC8F9pnM2+F2SvZ13I4051SqkNEvdnBf1w+wO+i5JYObMfNS++2xXWR2q6mJOzUNdtpy0eiRkHdaqwIDu/6EuLMTX014C/36gzY68FOASjFPkNGmZEFip3vwN8DdwoRmylBjF/L+ZAdon/ycQ01eZlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weidmueller.com; dmarc=pass action=none header.from=weidmueller.com; dkim=pass header.d=weidmueller.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weidmueller.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mblQIwKid27UqOCLTUN4f5pe9qZRosvcI/KOOFDQGyI=; b=PA0NEwNFTpHnYiDmpwuUQI4zT9AH1LJ3ZxIiH3+VGUB2XO32q4euqLVfZ9ludWfzseXdYOFm0Oz0jYnkvEMzShY+S2xLo4KSlRX16pwMWF6aEdzuv2e8PD8hZx2NKAv9k2Myim0Yw5PiRm+19xV5PsDgiRdxgb1eY/ChMtrEj5yszqY+iEe2JQAJSdmeGgsMaUqKJBnKo6djr9xhzx69Nn90wDUqvyxDvGVxPFmdbadO6uP5EuvRu/tb+bcM5URyBY1+uDCFZgona15DOHKh8M59pz/f02SThJRdROtx8w4vSiUhX42lQaVbb8q9tNa96BtGGT4eRkTZD3TmvxJmig== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=weidmueller.com; Received: from PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) by AS2PR08MB8384.eurprd08.prod.outlook.com (2603:10a6:20b:55b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.17; Mon, 9 Dec 2024 10:32:16 +0000 Received: from PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4]) by PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4%3]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 10:32:16 +0000 From: Stefan Herbrechtsmeier To: bitbake-devel@lists.openembedded.org CC: Stefan Herbrechtsmeier Subject: [PATCH 1/4] tests: fetch: adapt npmsw tests to fixed unpack behavior Date: Mon, 9 Dec 2024 11:31:55 +0100 Message-ID: <20241209103158.20833-1-stefan.herbrechtsmeier-oss@weidmueller.com> X-Mailer: git-send-email 2.39.5 X-ClientProxiedBy: FR0P281CA0217.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ac::9) To PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR08MB6969:EE_|AS2PR08MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: f2f2ca44-7a5a-414f-2f36-08dd183cc09c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: KgR8Y6gawTgtUTs3CFWrsUCDIacszjBmO4KJ+2+YbVTj9plsdTZI28JIDxaVLE/PKcAOSYexQda5excQjtaE6hKmzjvYMWJkFkUTsoRwND1g8C17eIB+sxb2tiffQb/s9uVlMCaNEjNXVmlcE4GGx0cMIMiMK0/9yB0mzk1DwBVbPhI3G+qwhzvuTQ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2B/l8MdJMrgrTL1yXW6eW0EwICeM9jIBV1/EdQtVMQMLhDRYcqG2C4rZJcu0xBcae0VijXX9AGdBESVE1YGKWF7n9iVG70/OWELrpNiBKx7PjmrC1rsFtapGYCXbh/7E73svesDYqlOpBJvAgVblVqmKEQK1ZAyuCVNA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6969.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8VmYfPXnsPHt16l47guIevNhmfuu7qu0PfnaBsQZM1UckK1mCjKDckn1uXhsq/riBPJtBoy2IF4IVI+Gj81bKDndRdkNtGCOCp6o30iQ0duKYiUlhNc2/XXLnyCuSV/MLz4LWYtaXkhXqhSFWOFe1Hl9mfhEdj5R36PIxAAmdK8oMBcbjj/TTqFW9VbTjKIuPw7nTiiGhopJEJ6OvL27Q4I1hcCxSrF2nY0g2opGFMyZU9U5rxdVWMqhg+wnwBXZfz9Js1+WiZaqvPCR4MJAWGcEzQFIe1SxKck2NFw1HrDBoTHv/Zjs7qsFrpI0SOfs4NUu/Q9lI4/WML3oYrO3Py/8BWBUUhmHMw4mlPhnVNKxwyqImZAeIit2mEp2D+yvfa5Vf7uJBydTHNTRPMd7jMIXY/pez+eTVyScwAVTBMr7iNteTrgITHw+M7ZFgF0N05zPeCsWOlWS9JzCVksB4tQl1Mlqc1Gqyz/zurqadTJSWpbgeqGm9tbwsLx9sKTehOy9hBEzp2MMnZUlkUZ7Tz3yc+NE/uK112kDy0EqEy+M9dpjngG4hGWRXBPjk+0yxUT0VaiHOFJ7fg2bLzdMRmIMwL+1C5y2XK5vcoKWMnDH0IOmjDG8J110V6nIx6DRyeozwjxxFfdMxeMUEBHT0RwxMSrmBxhlK9cgy4V941MmTw50yddHrLQPWQ+VHUH4qIfcKTwUU8ounhixH4352YcNiX6g1ocmYv4pXFp834xKlAqWITEqHlWc7w2DqFavDiHxDL6iP8O4YkQTMqnGYcKq188LjY4PcARbUCLfEXm+ld4L4FncqnZImsDZ1xlFyh5ecemVHn0J95vrhFwJGCrXpFtZmCsXF5EMzeK7NVVsR+rQwC/25KPHiBLdJTc6kik/I4G29CVaaPrz31+zCBGQzLj27WxhCxuoBR/Z5ujXg5t69qifi6NgVYlQueReM9wH4KziOvpHnARyjVutLXqsQ0kJpD0umUc3CPz4ws308Cud/UF8jFa2b/HeFCB7fcjfDWR0QvOWpXqpv0+XfIGk8pTw9g4wvYZuJBhVdWeqmfHRgjqaNfHngrqOOyI09Fe2wVOq3AN/uu+sta13cuTMSdBp6SDil8xW//ROlM7hDKTZgFyJTvu0Ktp6AQu4S4eF6HOkO4DUWK7pqTOO62xnk0TRSs99zTD33opPGtjRsFSZagQYsTXi3wGS0tl9ZV3JshYDqddm0aVfQlTHxWswjoUyrPtmGPD+VKoywTo5+xjiM+W4JMZ6moUfFR9Bxjl4tcYlqA2CERYsfKJPTsQJ+R6iqvFLHXZJkS50RQQ0Md5YjpnV2/KX6a1T/MtKLy0GdFkWA7J4QSbm4e5GJre1l8DhwPpPY3HeNb0tmMAD7EPLMyszmU57Y6C2wIrkmwyt1XzBz2ARqRSfOZ32cfmd4JJA/I4+1eR3YHtwuM1vXzuAYh+wZc0qNFs+gtMDbxSuxnAXg0XdBoxBScCwYKgaku3E904h+AN9xlhFDbw9/7ImlX5Y8H4iLvN1dYpXNQ921U1uU4v3saHFxNkQyC7Q6CTUzSUYF7jnGYTTZIkxcxSQgMHwhCRttvFr1iXr9fepzxXagi2zUftaW8jbBg== X-OriginatorOrg: weidmueller.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2f2ca44-7a5a-414f-2f36-08dd183cc09c X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6969.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 10:32:16.6495 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e4289438-1c5f-4c95-a51a-ee553b8b18ec X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: grjoCQZX9dOv4Qy8c5gBEiEoW+I98WIAE9/xqy5d5XgMwC28l2iy5CRYQ+zXCeG9YlX+fifTUzMFV+bewRVILA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8384 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 ; Mon, 09 Dec 2024 10:32:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16893 From: Stefan Herbrechtsmeier Adapt the npmsw tests to commit 84f102954e10 ("fetch/npmsw: The fetcher shouldn't have any knowledge of S"). Signed-off-by: Stefan Herbrechtsmeier --- lib/bb/tests/fetch.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index 363f3a218..01ca80724 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -2838,9 +2838,6 @@ class NPMTest(FetcherTest): bb.utils.mkdirhier(datadir) with open(swfile, 'w') as f: json.dump(data, f) - # Also configure the S directory - self.sdir = os.path.join(self.unpackdir, 'S') - self.d.setVar('S', self.sdir) return swfile @skipIfNoNpm() @@ -2873,10 +2870,10 @@ class NPMTest(FetcherTest): self.assertTrue(os.path.exists(os.path.join(self.dldir, 'npm2', 'content-type-1.0.4.tgz'))) self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'github.com.jshttp.cookie.git'))) fetcher.unpack(self.unpackdir) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'npm-shrinkwrap.json'))) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'package.json'))) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'package.json'))) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'node_modules', 'cookie', 'package.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'npm-shrinkwrap.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'package.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'package.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'node_modules', 'cookie', 'package.json'))) @skipIfNoNpm() @skipIfNoNetwork() @@ -2999,7 +2996,7 @@ class NPMTest(FetcherTest): fetcher = bb.fetch.Fetch(['npmsw://' + swfile], self.d) fetcher.download() fetcher.unpack(self.unpackdir) - self.assertTrue(os.path.exists(os.path.join(self.sdir, 'node_modules', 'array-flatten', 'package.json'))) + self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'package.json'))) @skipIfNoNpm() @skipIfNoNetwork() From patchwork Mon Dec 9 10:31:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herbrechtsmeier X-Patchwork-Id: 53812 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 6EFF1E77173 for ; Mon, 9 Dec 2024 10:32:31 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.108]) by mx.groups.io with SMTP id smtpd.web11.98025.1733740340477353303 for ; Mon, 09 Dec 2024 02:32:22 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@weidmueller.com header.s=selector2 header.b=TiETe9hh; spf=pass (domain: weidmueller.com, ip: 40.107.162.108, mailfrom: stefan.herbrechtsmeier-oss@weidmueller.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FgTiZhzdp5qQEU/rRYigf24aIFykl6405zYW6iZoD/nLdva65K3iZb1+EDWR3B5JdxoHlwA24lJ5xeXhLmDqzpG/NEj/5WRuLQtiSgLROlozKiF3MtsVO1kiybi3kUSLqPcrkkyYg5fq3NHkzvUj2pbRFOYQq7IGWEOkAPeAPiPTB/uCFmivgNnBxAozpRDYmrmJ0W7p7xMYqqVPuBt2zQYA5kpFHk+5WjLbyqogk6MivmkQNN+S3ixB/IFYFH0pXnEfiTHZbzHFeD3r07vCbAK4dhsOYcqRAUaXgSO8TUXIci22yiWohU53TEjfnLT72atL+CXloCybE8AbC1gM9Q== 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=CjWhncvXsFib/Bit/zWrbYcrltn4jU9HphHweNL0oWo=; b=CWd1VzwJHRPx7VX5ZNjdEdpn1lJuUEnzHJy7VpKl09JqlBXEYos0ZT9F5h/GpLQlhw7PUXVZbqp46iC1CpKkVDCXdHImCNgMmTCqQ23vcszGKvswAMQz9Ixg7jdGBdT8wfoJY/z/QA4w7rWA7Oc/NiV7/dblDHMWJaDzK8+FZWw3DqjqfSwaACgMao9oYAjvEoHLmgc5/nAZ+c4mv/gC//0ynsCbKbrEzUvIXNFUWRdnWYpU17GlHWRjLIOYZnuWmiTUPooWEWOASTxm8sdzXDzJEixFW8YV1SiV+22IItuFS+9OmPuKCUcXbGXdL/e2cIsWBpH4NJJnsUUvM1ye9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weidmueller.com; dmarc=pass action=none header.from=weidmueller.com; dkim=pass header.d=weidmueller.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weidmueller.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CjWhncvXsFib/Bit/zWrbYcrltn4jU9HphHweNL0oWo=; b=TiETe9hhISZ20nRxDpctGn60KOlyM+EAbQvHa3QkpdR8T+FPRX6nd++oTEgAjWbncmCiLHuVfCJprbJ7emrY8nc+cTQQHcV2v7iybErfQd7QFp7ymClgnfq7u9n9ZkwubCegLp5wfy/TqlbN7q77SWZ2KLWpNcTEUaJs1Zw4Q4Of25pMe3Lq9JzIS2EmVssOzgTH6WPtgSbLKGCfJTC0lKCvc9RfToJTsJxKHBzFUV+FzwYOjib5yKjW8cSloodAdHePLe1aJ6QaTIfFzpS19xZx1/l1NRUmLe9szMSSfVhyiBJiuKUnVvSZNXBmnD0Nc+zJYlvLkufRb/Sg4NegEw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=weidmueller.com; Received: from PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) by AS2PR08MB8384.eurprd08.prod.outlook.com (2603:10a6:20b:55b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.17; Mon, 9 Dec 2024 10:32:17 +0000 Received: from PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4]) by PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4%3]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 10:32:17 +0000 From: Stefan Herbrechtsmeier To: bitbake-devel@lists.openembedded.org CC: Stefan Herbrechtsmeier Subject: [PATCH 2/4] tests: fetch: do not skip plain npmsw tests Date: Mon, 9 Dec 2024 11:31:56 +0100 Message-ID: <20241209103158.20833-2-stefan.herbrechtsmeier-oss@weidmueller.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241209103158.20833-1-stefan.herbrechtsmeier-oss@weidmueller.com> References: <20241209103158.20833-1-stefan.herbrechtsmeier-oss@weidmueller.com> X-ClientProxiedBy: FR0P281CA0217.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ac::9) To PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR08MB6969:EE_|AS2PR08MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: c9ca92b1-7ae2-4c2c-b6ad-08dd183cc0d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: F3XuRpjU7mnxrdKG0VQ8eOw6f8outnMSItQTVXXyCCqm8nfZkSQjSnLgyRgOoajeG6lROQwAfDU4SzEn7k9L5I5SsBr7dbOs6gpL0i48YdSUNUFUkHx1csaL/zR7LU8eWMfeZFce0/N3OVta7jeAUnt25BNMKfJ0FBdgNCa8KkieRN/stJsq1cswSFKpCAzfgx0GXolGXvUYkLqfdC9w5jqLpVBXudzpgbjpCL/fEys0sIhisSQp8w2rP40tDwTvDfngEXEJ9Cbt9U2+3AE8tBf7DfOXlHZmC0HD61JIdW+ZNmhPi4NELga7+FsiBTzC6z4X4QIpagvlvHqDgrsqUZem4uDl6sfhvA3fK22cpw8d9oq7/JJ9smDjU9lEThf8lh0Ji6ejJqM3jkPk//d1VelaUFZIWU21gnovsD9v4DpWZrKlp3492YwXQBsWS08xLTU1wIw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ook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zZMTjCzV/2/ddYuUrhIzrryoCUwlNyzAkpjV3aXoJBzFydbn3srplE1yAQMQSYgmLUkb8Nsqohi1YpBCYyb74tnN0I8Edsq5vJMWh68rPokHElDTa+PIyYDH/UE3oqJ3aHjst4Jr4QkwbNbouE2a5smhNi0vc7/4VqEL0HCQ+aKfe9BiR01fTP597pGjturHBDMLgY4jfh9GHVzQLyxqgc5cqc8uaAGargVSv6UoAUkpDHyQozEJRHtAdDXGVTSmLN5TvOKtON//Ce1QeBW6xz3I9q341551e2d/azzCDS8od3z+WcnD6YTBus82l/V95o8roVRqs89e/OmFKgoMg7o99QwkGOaodpbS/EE2m/xu/+WqJTvCh/HPrVduOcRDhNUCyQQyw502s9XfgcmrzqGkS6wHpaeSqMszDen2mb7HR7dq1CDTjAcHL/6QZBTt+hG51CUzRIl8iin/01VdJGeJfkk4B8s/N2CWG+EuHsPKf8txNkOkV8chwrmiKjU19hW7iXEOkeQpwRltA3Bz648RqmIQbCGTV7iY/YLfqqm0qrqQU/pI1yy+lqKaKai/pe5P0xmVH/EhB2Y3WgGRAZEl74r6sYfzzsvFwSvv5HvIzCsGgI8WxzY78fTgyFw6QtGc1r5hJTsSK8/vku5wXaNliLe17dIksXXvGjhm6VG8Y7h8M8RjTmLjDPCv2a11M1sbLzOp9jaU9izLcmUT+iefOPwgYNa79He5+dlpbKdqM3qhZZFZZZMpq/00ERtb3maMniuY1WfrtBUINt41WOuf0ebVzaFiDveev9XbrugqBkKVi0/zLukRwZ7NUsjelbs8hEEnlEWrci2+yd3gkSPYlDV7pKUtu4eY4ea4N5opEZcS/FBVL9cfO/zKzSHeoEWCPI4aCDL3FKgrdJ1fK2jPoIfzbavXxykNklYNyXgNOyYhDl2V443WijyHgNzt7I4D2ggPdhjjF8XrC0KoHnGZbEjII1qF2NpSIln8n/FCE9J3+rkHv/7U+uJ8T5eWl7KIPM/uO8TDcgdofxHjrZcwnqhTWjPm1GhYaSsFESQuW6lG2rvkNKFk8n3oZDF1cs8fhdj5E+iRu6/2TleH4kqan5NuqPXR5YT2NKbDb5GTcBWGp8a7FCrSHw/LvWpTltr5Gr4XO2VTjOQoTLc1Rh5UM8H0ozD9/anWVgdoeatkFpd2yvmyECnI8PqXF4x4BMiij3MF6RnXJs4kEBvmSB0ScfjT4WhBOIGpVrqaBxg/Kau10GgbKkF5oH/ldacL2HgIsDig9VUGM3UpJw51FI2058RsShflKhgS93G0BnZrL7JHbPXZDjM4XoR8N4M6q5rCNG51IJfwYta+lHMAO+zCDLhZRfc2s+o+ckw66Up+VLdu5NO7uamfaqJLwnjMWB5kGXom7h/Q9XXPgavpvT08ca1QlI7gjidKZc8q9ZioB+8xeaIWjBAh/nN/3ShXnImj9glkDSEPJmnBSUsB/wG4D+gCDSgI/xYhHv9d1Axxvbg9lT7kaVijS3j+jgm94QtPruqVboGVqlhKZ8qQSQ/pCW2JcuLkQpY7o8k/PxYOCP/N8e4biB0NedLsSZyNB4JdgRwYxP/Kr59r/LUFiA== X-OriginatorOrg: weidmueller.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9ca92b1-7ae2-4c2c-b6ad-08dd183cc0d1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6969.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 10:32:16.9828 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e4289438-1c5f-4c95-a51a-ee553b8b18ec X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SCwlCszKuhB4S0dbxmjEy4OxFEzQEWaPockAJYlZGJhPcWCfsdLAEL0FeIuHgwtqIz9HomF5elFUoSz/p/RpLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8384 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 ; Mon, 09 Dec 2024 10:32:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16894 From: Stefan Herbrechtsmeier The npmsw fetcher doesn't use the npm command. Remove the `@skipIfNoNpm()` decorator from plain npmsw tests which don't use the npm fetcher. Signed-off-by: Stefan Herbrechtsmeier --- lib/bb/tests/fetch.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index 01ca80724..3eaaa8362 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -2840,7 +2840,6 @@ class NPMTest(FetcherTest): json.dump(data, f) return swfile - @skipIfNoNpm() @skipIfNoNetwork() def test_npmsw(self): swfile = self.create_shrinkwrap_file({ @@ -2875,7 +2874,6 @@ class NPMTest(FetcherTest): self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'package.json'))) self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'node_modules', 'content-type', 'node_modules', 'cookie', 'package.json'))) - @skipIfNoNpm() @skipIfNoNetwork() def test_npmsw_git(self): swfile = self.create_shrinkwrap_file({ @@ -2914,7 +2912,6 @@ class NPMTest(FetcherTest): fetcher.download() self.assertTrue(os.path.exists(os.path.join(self.dldir, 'git2', 'gitlab.com.gitlab-examples.nodejs.git'))) - @skipIfNoNpm() @skipIfNoNetwork() def test_npmsw_dev(self): swfile = self.create_shrinkwrap_file({ @@ -2943,7 +2940,6 @@ class NPMTest(FetcherTest): 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'))) - @skipIfNoNpm() @skipIfNoNetwork() def test_npmsw_destsuffix(self): swfile = self.create_shrinkwrap_file({ @@ -2998,7 +2994,6 @@ class NPMTest(FetcherTest): fetcher.unpack(self.unpackdir) self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'node_modules', 'array-flatten', 'package.json'))) - @skipIfNoNpm() @skipIfNoNetwork() def test_npmsw_npm_reusability(self): # Fetch once with npmsw @@ -3021,7 +3016,6 @@ class NPMTest(FetcherTest): fetcher.unpack(self.unpackdir) self.assertTrue(os.path.exists(os.path.join(self.unpackdir, 'npm', 'package.json'))) - @skipIfNoNpm() @skipIfNoNetwork() def test_npmsw_bad_checksum(self): # Try to fetch with bad checksum From patchwork Mon Dec 9 10:31:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herbrechtsmeier X-Patchwork-Id: 53814 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 7A3F3E7717D for ; Mon, 9 Dec 2024 10:32:31 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.108]) by mx.groups.io with SMTP id smtpd.web11.98025.1733740340477353303 for ; Mon, 09 Dec 2024 02:32:23 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@weidmueller.com header.s=selector2 header.b=zyxLdFPQ; spf=pass (domain: weidmueller.com, ip: 40.107.162.108, mailfrom: stefan.herbrechtsmeier-oss@weidmueller.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cNnjXmryGkZIIswG5b0mOz+Qee+kpzNrktjSwfBXd2aFJcg0hymxUt/B5b+GwvOKbWPK/WVOKu1yA1HJsLQLfRGCl1K4zrqu/6IYMNBYvKAsCkUOsiaVZy88dcFhGywpMRAPrRO2lWGyHVbG6h/8DXjRtehDaaIVcXWnCMFHMjHU8SwaFL704RGfisrrydhaKZST7hmLeGEcptBOTScfPewS5vVEHeOwxUH/cbkFq38w3tvF4PmqpQfLy1f0EtVaebKe4pOg0MgJu030iKX7beeZ3yFR0obNoY3IVCAnyTCmzuOQOCERfn9zXYpDHHB64YtwGNGYNh/Dei7jm34TOw== 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=wGYJ4xX0vQj8s4C3rYIzt9Xs2saHy0Sv3j9Hl/J8s/Q=; b=B0wybbfR2EW6jwKT/WMOrMUXfvu5HXT2simcr7FDw4qXHy98dpqPdS8XnmNp45ALIIZ6T3K2mhUEBFj+YufJ+aSTGaLCovjbR1J5XpdRETWfztUo5RPIyabsQ8gnjEFNjWO9ZGpkWgrWkBGOeK53tz5x3BOqFtkRm5ObBdzC2GCMJNJbcwlgSJ3Z72hCobsJ07N1Jnt1Dc8jabO540Cq5gPOqh4TTesm7GyJH+JpUq6UI0e0MNrYYuAQoE99rNf/91ES3MKhAG6oJvpxFnnrKi0HHuMYRfayKRXw7VfCq1vwmLefqYMf7BB6PrPUkgdK31zToqBOlSeGQiLNSy9nBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weidmueller.com; dmarc=pass action=none header.from=weidmueller.com; dkim=pass header.d=weidmueller.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weidmueller.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wGYJ4xX0vQj8s4C3rYIzt9Xs2saHy0Sv3j9Hl/J8s/Q=; b=zyxLdFPQajH7uCCryUeTI+rIR5s3lvlPN5Qb/i4qxeJt+uu7H3jKpsrK4uku+0bJPxYTUEm7jj1/UdcklUaLI4mcg4bfJUqb6z8uvtcOZROhwjFD4m/3n5dQ8f4RN/6g6EC1F5aieTqfxPzsUmc1Fw6vZvMDNNIergKHaXVZHKkHBlwf7kEbQrx40hqX7P2okRCUpppRFeup+/cOn9q3m398W2XsLI79uyT0xtfWM942YCozoiBxuDjI0oi+u7o3JUub+shWBp/AsU01Hsd6Cs+zBxRpc3iAYoNvv9UDlEENZ51ZrCQ06LlF+fWRmdT3HAA1nzhFfgH5/QxApB56XA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=weidmueller.com; Received: from PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) by AS2PR08MB8384.eurprd08.prod.outlook.com (2603:10a6:20b:55b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.17; Mon, 9 Dec 2024 10:32:17 +0000 Received: from PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4]) by PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4%3]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 10:32:17 +0000 From: Stefan Herbrechtsmeier To: bitbake-devel@lists.openembedded.org CC: Stefan Herbrechtsmeier Subject: [PATCH 3/4] fetch2: npmsw: ignore bundled dependencies in packages Date: Mon, 9 Dec 2024 11:31:57 +0100 Message-ID: <20241209103158.20833-3-stefan.herbrechtsmeier-oss@weidmueller.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241209103158.20833-1-stefan.herbrechtsmeier-oss@weidmueller.com> References: <20241209103158.20833-1-stefan.herbrechtsmeier-oss@weidmueller.com> X-ClientProxiedBy: FR0P281CA0217.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ac::9) To PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR08MB6969:EE_|AS2PR08MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: 280fc157-606e-455b-1afa-08dd183cc107 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: X7UPp9ZA3UeVzHeDmZcZa1J3xzcQ0Rbs5p53A2eJKolt4zZ8W2D+MbpGOvJDO7W0XJzBSsAkrDYdkN39UAu0Iw6+M5YaTvV93yOF9gsSJ889r5MUq/1vxgK4k/iBMpqcsK5Au8NwoA9XK42ggViHqBZ9r+Lm1tp/P81/BM1FdOiDU9qZ6q1Qap7NdbWrFYQm/NK0ma82mhUCNJvFYoD2oKkWaDZuycy42616gCHN1R/1LmLfhVAokeXO12gyucJXYFEw+bwU9F9gLqCuyq6gRltUan50B2kTs5W3zfO6nCb/vy09Nsk+cBoeEIYYov4yRVnI3XSgqJdkgVmtfs/GbbncJBthu9AkB3knnQ0DLwqAjvBCaP+pVOBwZh/5TbjAKJd9cJ64rlShJqaM4nJLsTrK88jYnO8SCxeqboJ69E22wiq4p2BWrB4XMSo6H2Moyyy5kM/IpVzgoctSmWCkd/J9+G1hir5jNSVtdzzHKKArcfNG4o/vw0c9OqsB4mI1OJBVdzZgPzLeTtNbstn9sb+BoZIuKn/jMBnpv4E3n0ZueVAY1P5lEp+UghdQAbDApP8HjQv1C2YTYPBGfp0VUZi+YYPCv8NM42x7rVPdR/MFokKf69R4U1UNess6p0mrzIbviG9nqQnkPsLbIM9+Pl6NicqtLYmhnIe+58JXjDBFmTCqnOHSnjHWE8Y4c1dy9v4AF119HD3p65U2w8+IU3Abn5PmoAYR/NFl0tl3YmaDPkhv9QVLScbXCVtY+UVef3CcqrQDzo50JpwZcW6caCTi4fVihUn2+i2if5in0WQv2m1HzLWDABhxKH/gWpIpPdJ2OhONNlke+kmmvwRyBJrdzTEC5pN5Qsy+A0Jv45VP9t6IadomRw2mKWxPJCOjCtxSzvoS+R3XdmqmMJj7Pui/YttV7eexvZZUaTRyn6qn1U+c9c9/W5JGgeVl9vNmH2TJEp+G5lJ2T9Wr044O3ukAetZ6miEySIgWGE1EOYoU+6fv/dJLyVBzS0n8JOuKce/HVzaO8PrqtVX8oraAakEL64R5Xe6WXjlRZcPyOjEGhN1lNLs2RIAgPga6Phs8+pSMXJFzUFV6EUVhJ4Fs1hGMxpcj3Ah431ahpZ6rSxybb+OR2KcrD4BRCRLsodGRmLIMW06/tyIuw6Mz+Qj3MHgTkrYxQAt5aev5pGuXeQpIZ7V5rrjBQa2yyO8kXfOeLdxVCkFRBLbPpARt/SruWdVGMRwlYkk2+SOCjIB1h9El/i8D7hddwqAhtH+bxflXLCFSFZmeN3UUoLyLLPdclgjjLTv0VQZJHq6e+6Iv3qy2Z7Am6JrnJcHhfQdeteU3vboGbcMRVHUcVXK88GDmIH4LRfYmGgHCtd+RUuE5JOu+QBmZyhIsZDAE6LKxe11LwpLQz8416b31amEQajoD3g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6969.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8w7oS+zRomFCiJOq+eCnVmwfn/ri2ko4ZLZGpBEXmzWiwnipyKDkGInJabcn2NP5ftn+ZwnKndLxLJddDE8W0N25qvg8qCG5m8EgnvOXO4PW04B1DcaYZ2A+HZIaTGpr1NVEU45kVkW9a1Lx+eFs3Uzsqq/wrxDvL4CmXqEullysd+bkxo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ZpdvAyMSQwHUPYxx0LMJ8xdVDVp4s2DDm6/1ok2vCLFS+42pzp18hCOJT4D+GQ/GA1u+NSkP9w8W78KOK93y2hAqL5KkjsFqcgAPwwZxprP6/rJlYBsZRhjhvAZUx/E5/0OkrUFGzBrx1COIpCvvBwECEsGkmMH2CzJYberK0DoGZyIa8SiMWR/0EQtFBabUHoLiF7/gIYhlUfFQOL/NgdRv31c6WXeJHsRT59wq3NPJZh4Ne1TnRfa64F5pb4QdnOekrd6iWjtQ1V9/PIwhvGwlvY789aeFxiR0h94XBXZsEfooDIvi/izZ5OKbliSKC8YGK8ysa3dIfwACTp5zv4mkZ1QEwUhcakN1/t6rsHxgBkGFKoP6c2w== X-OriginatorOrg: weidmueller.com X-MS-Exchange-CrossTenant-Network-Message-Id: 280fc157-606e-455b-1afa-08dd183cc107 X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6969.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 10:32:17.6585 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e4289438-1c5f-4c95-a51a-ee553b8b18ec X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dVx3LEThVw5AvIl7kApO76qQmtRzXxxdSit4lEGfB9OrO8D/vnW8eMCsYgmYU4lWd6UjSzcj0vODllRITKbLLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8384 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 ; Mon, 09 Dec 2024 10:32:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16895 From: Stefan Herbrechtsmeier The npm package lock and shrinkwrap file list bundled dependencies which are supplied together with the parent dependency. The flag depends on the lock file version. Add the missing `inBundle` flag to packages list processing. Signed-off-by: Stefan Herbrechtsmeier --- lib/bb/fetch2/npmsw.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/bb/fetch2/npmsw.py b/lib/bb/fetch2/npmsw.py index a5fa598de..558c9a2b0 100644 --- a/lib/bb/fetch2/npmsw.py +++ b/lib/bb/fetch2/npmsw.py @@ -66,6 +66,8 @@ def foreach_dependencies(shrinkwrap, callback=None, dev=False): package_infos = packages.get(package, {}) if dev == False and package_infos.get("dev", False): continue + elif package_infos.get("inBundle", False): + continue callback(name, package_infos, package) else: _walk_deps(shrinkwrap.get("dependencies", {}), []) From patchwork Mon Dec 9 10:31:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herbrechtsmeier X-Patchwork-Id: 53815 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 85799E77182 for ; Mon, 9 Dec 2024 10:32:31 +0000 (UTC) Received: from PA4PR04CU001.outbound.protection.outlook.com (PA4PR04CU001.outbound.protection.outlook.com [40.107.162.108]) by mx.groups.io with SMTP id smtpd.web11.98025.1733740340477353303 for ; Mon, 09 Dec 2024 02:32:23 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@weidmueller.com header.s=selector2 header.b=B9lcE9zV; spf=pass (domain: weidmueller.com, ip: 40.107.162.108, mailfrom: stefan.herbrechtsmeier-oss@weidmueller.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xrbf1svKBVtEKFStwIUhPCuYi7bq0juZrSEih4nHS0bDphDDHAlyRs/U18KiY1fWUI4Q4qJvYKLMj8MlX+2dAxqvWTz9MuZeRO1Ykn3eT5YCWuoxyqJEcHvFsKGiVCHQh65UReiltnPsZcK2d7d9WS107IUKQlf4CmSBKsHylR8fXx7LxZw1aTdHaJfj2bSVlQ/AtbxXqgxaPOuTp4vaTfd/6FlkRfvxkvIIPIV+phocZw09Z4w7kR9Da9G452+eGGEqWnb5mPH4EGk6Twvnfx3P7PrPf0JfIXrGUVF3U8u7VtH9rVpbZu+65jdUPI2j2yPebP4UPX9UP1YZWTcHyA== 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=YXafPm23m9zOx1oM6wVWEJnREmZhk/nyvyac4xnyl34=; b=C0UUzyJhFK5/834R0a9JeivodhTxmZ3NPgOx55NVlOi+IWdD1pHjT9IqGT8jJKAB5E4eWzlAPMpw/SDzQ//9UQUsxIc3VtcJlEQEhV0pwXeIkSxLQwom4HJekyUZXII1KOsrOt47d50U8CL2y7DuNv4VxNrWew2b5vFXro4ZMLO5kp1/qfgwOb2nJx2Q6/MUVDNu9v48TEX/C9syW0ERze+UywI8vdBfTfdd26/steHI7JkH1hdehHTRhDnh4KWSM11wGEH8PPHXFImliHvg2xeFSUumr8XBGTlsOK5THSTVxrqhTJXB3j+n5Gf6kTgL64biiy6dX+Q8CCUidgQkkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=weidmueller.com; dmarc=pass action=none header.from=weidmueller.com; dkim=pass header.d=weidmueller.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weidmueller.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YXafPm23m9zOx1oM6wVWEJnREmZhk/nyvyac4xnyl34=; b=B9lcE9zVjUPrNQwg1wz43wxapRL2iatVqr/nEE/kFSWLkZEq3xxF9uA5u/z4eGy/moToziAUD/yt1JtSdYofGXiogun27elk7gKB51hVUNHa2qpySfcOUP/54p5/Lxc5UsPQvWX5P3ijX8PiFBp5pNqjh/7oXuCKxG0ZUDWl0BBrUn6PDf72t1yWTbGhcOLqb5utm9EqRLvXgySAB5yniA5p2HGLNozw3rYUmSXWsOw9JBJW28Mn8tRa9ZKXQANjjMweBCtIjJgQlR58v9randEPGQxq3BFZIzgoefSLRqo4kMIUQ2CyQ+jqlamueOs7SpZVQRofhQdj/mjW016BxA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=weidmueller.com; Received: from PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) by AS2PR08MB8384.eurprd08.prod.outlook.com (2603:10a6:20b:55b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.17; Mon, 9 Dec 2024 10:32:18 +0000 Received: from PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4]) by PAXPR08MB6969.eurprd08.prod.outlook.com ([fe80::3b1:b329:1ed9:dad4%3]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 10:32:18 +0000 From: Stefan Herbrechtsmeier To: bitbake-devel@lists.openembedded.org CC: Stefan Herbrechtsmeier Subject: [PATCH 4/4] tests: fetch: add npmsw test case for bundled dependencies Date: Mon, 9 Dec 2024 11:31:58 +0100 Message-ID: <20241209103158.20833-4-stefan.herbrechtsmeier-oss@weidmueller.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241209103158.20833-1-stefan.herbrechtsmeier-oss@weidmueller.com> References: <20241209103158.20833-1-stefan.herbrechtsmeier-oss@weidmueller.com> X-ClientProxiedBy: FR0P281CA0217.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ac::9) To PAXPR08MB6969.eurprd08.prod.outlook.com (2603:10a6:102:1d8::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR08MB6969:EE_|AS2PR08MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: 8afd3bdd-e1a2-4d95-2b02-08dd183cc16d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 855bNlFGyYWNVXlpdpPTjqTlDLh2DZQRKPslo/FXxg6uoLTVDBnqNZ7bOqol6NWZNIXJmk2ozJ/bw68+tQcbzk1Pp6Yxd2fkFg4c0O1gZ1Krwsvi7QW0H8iTd8Zp2NNuax/r99sYvXmwSrLFsTNoXs7Po7KSQz62zLdtl9X0maZbvoeQlOFinyH+HZqUmvp78EUSLOaRa1bDXK0jKnHudOt0ka/sBTkERiz8rktAjo2BWOu7jDN8mroj/PJ27sXOjKFb5cEGaEXUfDCET56Zcroj6JWe+WnQOiSU7YNAVx54VNPQZ4y3E+C7HlphC47Q156jPqBFTElXU3W1eeFJ5WeW1BTlApAYCau07Bmg3uZ0CT4axCsB7b/lmH0jVHKKme3K79JIATjtIWz8uuuj69A8xuPJZpzQmEc8S5h+6m9rYu7M67xG6K5PlxKIr62zghyEmfxsHBZaJlxjEHdS7oYpNdNyxKt0gSukiLXnA+i9xi2HY/ldKriKmsmgBoZ7D+1By0jtByiFTSjFdE+Ir6v0B2P3Q0V3Sad8bJoC6tkXgHOV7DwcBhb4ycWCP7FHosvtT9hOfN2/X/4MWseGwx9YK9Y4qp56qGpBz8Js3hgZiMMfAvOnAYuwQ2oBrgzUpkaMt1laoEIrx7sh2D5vIjSTTxdI+usEX7PLjebWw9AyzoZJo7fnk62Ub+cbTghWzklCzL0SVzX73L+d1YldnuY2BYTvSMrGXuO2YAY+Mfn+eki4Jkqrm29gOCUaA3zNlTdqcL/27xpAJLeIOoNqlnx4qDvfN8SuE9+xd8HdYb6AsIZtDAYM/GEDFVnQo/Rin92bxejzmHNXhnDipBbYBsfpaSKwT9M11b6SkwRztpceB6oK/4X2xXXfvOhOMCbmBtSHDHeSjLbzM28c9oaRcnKSVHIZW2BUigYvsZ0Ai2cx+ZwU+JbYW+5MIhEs+IyJAichz/eLlJHH3q5fByPavtss+YnXTyVGWRW6WJOO0SDFdcA+p/QOx5mUNnldqtqC16Thwau5i14ls/XbTDL1rj7WarB2gMaC1aJQFuzvEvo90jX1Wrtgv9moAD/CVKol13vnTUM+cFaDDhyZB8BB76snptC24SiQAIPwV+eqnB9FvSnmkiXLA/Kphxz4RYIBdwRO/R3h+HW4SBUh8YSh3fk+vj8zRry9TRE8yP35eHCSIT93alHx61wJkui85nsYjWpTPbXcAfriAi5KQUmlo5ZPVsuicbuSMdEsWa5dD//+NrHgKYhs5ATg7wO9oVZDIplnlZ+FDYQybA7KtrJHcy35ITqm4HFfZK9V1aU0CKAMnum+wvc5ptYmi4WBJj88Ps2aPJk+VFb44VF5M0ZRQZ4RCLlI60LN2/5bDYA4oVg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR08MB6969.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WBPT0Lj/JRHZ5v9Vju0ecSA/El7Tb2oy4omfNM2IWHJoVq//I7eI/cCA3aCztl1Tnej9tr3oeWYf3noDvdHxkrpbseQY9UdkGZa3OA2kv/CZ18mrSp4T0OvhG5tgZv2WK14zJ94DaFF1Q5OgNxZ+oYZn9FYEVdCfD3bMQNqXxogzhijXx7ctWXFn37dEI4JmGNS2ZQR+4/ijWr4hA9t049moWn5DHn4gybNWe1ac+9gbt0l4z7AMm1Ky+qB4lfxkTxLtWE2I+BVSshI0fhmojp7JH6fkUGFc0bez05KTxHaN8jFiNyG2lHRqTw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5NxZb1x1n+kE1sfTXYXu2t9/F1LfZUuM2DD32yksipxGzFW4Ht5wJxGfawN7qzQ7ZHfA7dvRJc9yECBRcIdRGMcK34poyjglX5l6U6SW0bj55qE9JivhLg9135s5307CpsUVrsv2tqP4MkAPLG1EmRzI8VaiZ/btYDDosVDQTq40+1cM8yxiocC21RrazTQZlOUMyvwrn8MMZMpHW4zZiVph2hg92pTJoZsUzCQ== X-OriginatorOrg: weidmueller.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8afd3bdd-e1a2-4d95-2b02-08dd183cc16d X-MS-Exchange-CrossTenant-AuthSource: PAXPR08MB6969.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 10:32:18.0599 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e4289438-1c5f-4c95-a51a-ee553b8b18ec X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kWiSy9bCmN7FYDJ3WJf57GamigVzi200N/ixAiCX2z98ewzFqcag/rfhTcpg5pI7NSVU5SXjc6HQ1SbS95HOMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8384 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 ; Mon, 09 Dec 2024 10:32:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16896 From: Stefan Herbrechtsmeier The npm package lock and shrinkwrap file list bundled dependencies which are supplied together with the parent dependency. The bundled dependencies are marked by a flag. The flag and thereby test depends on the lock file version. The old lock file version uses a `bundled` flag and stores dependencies in the `dependencies` list. The new lock file version uses an `inBundle` flag and stores dependencies in the `packages` list. Signed-off-by: Stefan Herbrechtsmeier --- lib/bb/tests/fetch.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index 3eaaa8362..6dda0d381 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -3112,6 +3112,32 @@ class NPMTest(FetcherTest): fetcher.download() self.assertTrue(os.path.exists(ud.localpath)) + @skipIfNoNetwork() + def test_npmsw_bundled(self): + for packages_key, package_prefix, bundled_key in [ + ('dependencies', '', 'bundled'), + ('packages', 'node_modules/', 'inBundle') + ]: + swfile = self.create_shrinkwrap_file({ + packages_key: { + package_prefix + 'array-flatten': { + 'version': '1.1.1', + 'resolved': 'https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz', + 'integrity': 'sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=' + }, + package_prefix + 'content-type': { + 'version': '1.0.4', + 'resolved': 'https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz', + 'integrity': 'sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==', + bundled_key: True + } + } + }) + fetcher = bb.fetch.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'))) + class GitSharedTest(FetcherTest): def setUp(self): super(GitSharedTest, self).setUp()