From patchwork Wed Jun 10 22:53:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89709 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 5E71BCD98D1 for ; Wed, 10 Jun 2026 22:53:29 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.33615.1781132004327087769 for ; Wed, 10 Jun 2026 15:53:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=U0/2INfO; spf=pass (domain: smile.fr, ip: 209.85.128.48, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-490ac357c55so76931935e9.1 for ; Wed, 10 Jun 2026 15:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781132003; x=1781736803; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4CjKr0qX1d668HabZpFzG+MHiddz0rIE6LgKXx4FAjA=; b=U0/2INfOgYBDLaRfVBPSTZ3DxG3hVLgYQBYlxe7G+894KI6amg3W7IloGbKoEESME6 pGoDl6RlRrxkAOCrf66A45/ZgUnmhMimgYdFC/806n/LZP0h6LKjFT04lKs3+IXOBqw0 5lMVZftcJpAlfIP7KEDtUyuPjkjl3Md3XdNIw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781132003; x=1781736803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4CjKr0qX1d668HabZpFzG+MHiddz0rIE6LgKXx4FAjA=; b=LVFQP055yAWx0xAfg+mIWQn6MqqcqW8ekoTRUG/3AOxD2rZSDqf8tEKlnUgt+rOpcI Td7XZjczvrptHyNVLq0vAN77UBQTWKsXoaixtSctCopaAfEffT8YaxaHO+05X7W2z9KI w24OrZ0yEIIOw0TTEa5fp882HiBYzQo8xGy8aHCkpf0JH0JB4yNbU8117vtfgM+eHvuW qMXtJ9naZ+RH3GMlGtHpgCEP6+24BMB1mLeV2L5zX2onq/SXHbLuvoUi8QomaJdWrYjC 4FxM8w8CLSNwVLcbykfBBHNJJuJasTlw0HBSXOcoDoAEsfH4LwGr3SP+7Vxm//do2t+D wNeg== X-Gm-Message-State: AOJu0YyLdj4ws8xE3GCOCJZ/PIL+/X2u+4x164tH5b99DwXfovzFiW07 eBpwhPI3VaadnNEwM/clr0SrFgDJeAzoN0IFn/redZFhfU/c+fF3IifephzVNHOsn3We/bWNz++ iIi5x X-Gm-Gg: Acq92OG3lZNlF6n/rlOzvjEcVSzCX5gPPNWNCdE8KKpC9ra6WibqcRNnaVw5P8Rc8Q/ 1SypGuAkmvWixgtirBJKFDr5oMsCeUHK0yD3tvHbpNKSoZj5eMgBgZFIlKd5xZGu4LbNDCUgATh 2gEur4pEXq1FucuLmi+LnbZLWDydXo8IRjfR0JaZYToY7YdFFtyUBmfkTXKijE5vitjybXAS+6/ qWn4as/tGm6NRJ4faxZ5YEGighOJ6B/6UnipSYwHBLPcxhRP0inn2WXn2jD8CkBcX5X6i4E0O51 AeVgz3Tb4lzhKQklTV0t9L/KApVJmOM0fQnvs6hMBnX5Av5lvnrw7A/b4+uw0y1kBC5mayvDe88 wjv3uyaURT3+O+xtQSVPTvSnqPx8nQ6dkL5Mrtfg7KVW9sy2N6w1AFATi2z3TucxplBqkesVq6q ofG6mGCTJtHFngXeKdjFKzMo80A5jQuhHC5dlxWyxTKVjSW9Zf8QfBfDbtK0JMK6xK5yl6/bJFN vvsIZ604dPP0X7AgxGw/0Jb3Ch30wBbuQFI0Ec= X-Received: by 2002:a05:600c:c493:b0:490:ae52:499c with SMTP id 5b1f17b1804b1-490c25f1ab6mr459391815e9.21.1781132002610; Wed, 10 Jun 2026 15:53:22 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00bb749f54eeb85d7b.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:bb74:9f54:eeb8:5d7b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f351d69sm132348771f8f.29.2026.06.10.15.53.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 15:53:22 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH 1/6] fetch2: reraise IOError during download Date: Thu, 11 Jun 2026 00:53:03 +0200 Message-ID: <69e22a5f95d650ed83e6064d4e99b8dc067a6659.1781131922.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Wed, 10 Jun 2026 22:53:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19648 From: Anthony Squires Fixes [YOCTO #16268] Adds a missing "raise" statement to download that ensures when there is an IOError/OSError that is is correctly reported and not silently discarded. When an IOError is thrown in this case do_fetch silently passes which then leads to downstream failures in do_unpack when the file doesn't exist. Signed-off-by: Anthony Squires Signed-off-by: Richard Purdie (cherry picked from commit 0460038e4705934e614b26ba5febc09293924cd4) Signed-off-by: Yoann Congal --- lib/bb/fetch2/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 0e4f491ce..d913d7511 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1969,6 +1969,7 @@ class Fetch(object): if e.errno in [errno.ESTALE]: logger.error("Stale Error Observed %s." % u) raise ChecksumError("Stale Error Detected") + raise except BBFetchException as e: if isinstance(e, NoChecksumError): From patchwork Wed Jun 10 22:53:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89707 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 51C35CD98D0 for ; Wed, 10 Jun 2026 22:53:29 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.33616.1781132004887825265 for ; Wed, 10 Jun 2026 15:53:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=3+Jt8DJK; spf=pass (domain: smile.fr, ip: 209.85.221.49, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-460662fcb4eso128775f8f.0 for ; Wed, 10 Jun 2026 15:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781132003; x=1781736803; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1bJTm+x7gsnTZIqc/fMU92sr9KNTqmmtFPtCs2sPVEo=; b=3+Jt8DJKV/0E+FN1u2bwhL+xvuF0h9y5Q2gkDLIHgR8xKUbdN/SKt66U+HiIoe3PpS +i3VG+EWdLuqJVCQEzM1PSOCHA/6PdeFPCtOWb0fmzaFy9Zp/AWtNg5SpLNFtS/DpM12 MeRuXHnNzC3FtRFVyFscGzvTqiwuEwMBS+J1o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781132003; x=1781736803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1bJTm+x7gsnTZIqc/fMU92sr9KNTqmmtFPtCs2sPVEo=; b=V1hTE8Z3Pxni/tYuvN9yw7NDQ2IC9t+l3AIVa8Qvjhd1URhR3Y+a9FWnNGLvvLmxke dP+/j27cCRO7/5XN5unxbOxMv52S+rfGcjgntPyO8J9eVMUsGYzTS73J6w1h8di91m4s sFO9N/zbR1CXXsXMF/DToITSdfY82ERpqWrLy+jXpay8+Q0muSPy7bdTQQieNQRiCDH8 FLHSJM8eYrRWlRLbpHa/KPOJgktS5zqZrQJT189vC5+vOSrdbVBIVsY1p0EzzAPhvOr3 JGNquOudwdAESXs5z+k112vYXslyf1EriMYv3bp8+or8f38SDHFZbD+aw9mvrOayRbRE b3/A== X-Gm-Message-State: AOJu0Yx0MWYUybLJBv6Wdsz0P62o+I/KnN+KjXmXcloVXMBHWU2KlIdR u/yKf5flNRF1DFGB/gDxzQ6IfsnylWFEt5IpVmkE3q1D4VPDMq+XHwQzSN1HbUMlZMu0Ncpo6fx 39q4a X-Gm-Gg: Acq92OHyOV9kbAxugZ/Zk4EoG3zwWeQFjgkWeURSFo6+PM6bET+MyOe3n4aGg3Fh0iT mqZ+sm4TI4S206dvN0zYmihaGyrdU5oZK0/lZwHZRHP8fttpAMhMKry9t/DPUY3VlWP2z4wHjZA nZ/I8LyrcIgoUYHmPljxxSHrftjJ0JrUt0R6LkCtEZ+ujEFdMHfjDIL8i/GQly9Oh0r4UGjvP2t /eZmuF2mf1k0TrHKbh76xvOtw/qhd5rJut9g+Q/oKhzY/57ldIj1pr0qUwHgAAaWGA8yaoRgOdq 1kxN1BGKiWiDiQSV42J9/KcPczlYm9+kSQNDn+HyYAo9vm3SWOyAMLmLD/oPQ59F1nvsvBKIVh2 vSiflHUs3SO6C7C23MT4XktBYCPvU4x+U79i2WHEFUSg58Xemr/llpINMb4vS1t42YDR4UCKYyb QyBNLSDJaPta45/z69D5qtOHpHc5tHGnR8oCgH/WRS2bUs610+dGivG1K1uxWPPKGKXmsBt4mar krUr2KBDslb6ARMaRvvn/PdM4jlM19g8E/SEt0= X-Received: by 2002:a05:6000:43d6:20b0:45e:f271:5019 with SMTP id ffacd0b85a97d-4606759c68emr203883f8f.14.1781132003194; Wed, 10 Jun 2026 15:53:23 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00bb749f54eeb85d7b.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:bb74:9f54:eeb8:5d7b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f351d69sm132348771f8f.29.2026.06.10.15.53.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 15:53:22 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH 2/6] bitbake: fix issue with varflag exclusion Date: Thu, 11 Jun 2026 00:53:04 +0200 Message-ID: X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Wed, 10 Jun 2026 22:53:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19649 From: Marcio Henriques This patch fixes an issue when checking if a varflag can be safely excluded. BB_SIGNATURE_EXCLUDE_FLAGS lists variable flags that can be safely excluded from checksum and dependency data for keys in the datastore. When bitbake checks if a varflag must be excluded it checks if the varflag name is part of the string stored in BB_SIGNATURE_EXCLUDE_FLAGS. As an example, if the varflag 'filename' is in BB_SIGNATURE_EXCLUDE_FLAGS, the varflag 'name' will also be excluded because the check will return 'True' when checking if the varflag is part of the string with the varflags to exclude. To fix this issue the string from BB_SIGNATURE_EXCLUDE_FLAGS is converted to a list before checking if a varflag is part of it. Signed-off-by: Marcio Henriques Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 8ab71d0ce302521da6a7e18c887cd85d9a94e8ee) Signed-off-by: Yoann Congal --- lib/bb/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/data.py b/lib/bb/data.py index 5fdcdb04a..b12972c03 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -378,7 +378,7 @@ def generate_dependencies(d, ignored_vars): mod_funcs = set(bb.codeparser.modulecode_deps.keys()) keys = set(key for key in d if not key.startswith("__")) | mod_funcs shelldeps = set(key for key in d.getVar("__exportlist", False) if bb.utils.to_boolean(d.getVarFlag(key, "export")) and not bb.utils.to_boolean(d.getVarFlag(key, "unexport"))) - varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS') + varflagsexcl = (d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS') or "").split() codeparserd = d.createCopy() for forced in (d.getVar('BB_HASH_CODEPARSER_VALS') or "").split(): From patchwork Wed Jun 10 22:53:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89708 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 8CC41CD98D2 for ; Wed, 10 Jun 2026 22:53:29 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.33442.1781132005256195692 for ; Wed, 10 Jun 2026 15:53:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=OuQiz8oO; spf=pass (domain: smile.fr, ip: 209.85.128.48, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-490b12270b3so44003155e9.1 for ; Wed, 10 Jun 2026 15:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781132004; x=1781736804; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KNC//NHZAI5gNisy88SrA7x3BSB85BtBOZzunxXdwas=; b=OuQiz8oOyvkHNlwtyZWXYsQvNbDcVDm9Ol5C1Nv1u/M13tpFtAVKGL0WC4KKrZ2/R+ Rf9f0J2K01XS3QOBOgRSmMnZyGmV9jVAoIRtnDDVdj4COmBq5t9xL4un4JK83ZmTb0VH hIiD4N9yJRS5Z6/eO8oWNp7syKqdJ0ks6uagY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781132004; x=1781736804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KNC//NHZAI5gNisy88SrA7x3BSB85BtBOZzunxXdwas=; b=L1KqEw/opbX6RJLZPrzo5jakKCEseSwJViw3nKNf4XmPX7HgTzPzCQFMuRTMUUf9Mf sYWylg4tyf0N29JhS5Ikq/yazTEJb+qwAqde0jtnquUg/4aekv4obPriC5mb8U5dJirs jVoCCIDIGZTlmzPxmxsuwX+bWE/rIvv0J/W8IYq1+Hcla1wkMaIh2UBRIzmfNCfcmIvl qVh1rcxda0BsAlrdvQ7Oe++zjXJfwj/n73yFF7TmRL0G9HFNxkvs3QulH5/ioLjpyuZd uOJBwoxH/78sXwCm7W3uA81o9NQzrvDp4bCDjooEH8nbera/KkG1uIFNMa2aX3w4rbQm /m9Q== X-Gm-Message-State: AOJu0YzUHH6bM/eQ74qxhYH8a7flRiwKsdVwRoIk9d7vsP+LjY0HrOKj 0OD1Z+J5xuO4IEMA/uyHOM1cOZEt34xWAcI+OBIV2lECjEENhZ9SZ8zVTjHtjxzog4DNnlC4d1o wrW1S X-Gm-Gg: Acq92OHrr/FwB3eKiah67t4jJ6hI69jfFvEd2SDKJDHItuYeNH79meCc6VjvqLlrh5/ oAgiyfSq0GPba+F985ML4W1/i3fRzWz/DGnhvjuLnL5bX2YRTRPig8w898uzGO54uMoTbf41uy6 g/icryiN2H9knI7ymvJ8ap2MmNTFfydeDyOk8qhTRWwC+YmwtxxDvdf4pUQir9x/vviyb9DICn9 wyhZ/8p4JdJ0Ov+QrszfZto2cqg2J4IAxWNoEI+4eR9uK4tMM6PVeBCdgO5Dd/gXPZqQUSw6rBK FAdAAFuAmI+pvN92wS6BtugV85Qvzihr6a1As4qiEpIp6aPDtYiJsBZg30i5Twe+X0LkKpEYRvl dSmc8bxgEX1bswrVvcEXC3nXg97BOU95KL5FtOq0vQE2isGZGg6AmJ/mSihQpVHAyDSA10G738o d//Z6P4k1z61Zpxudi3LFe8igpHQbg6zjyAp2sdnN99G/F4VJ5/bVo4u2OwGfXc9hX+LmVMB+YV y3vb80azNrjP6bXLTF9k8DYHbK16sTqZb7bp/I= X-Received: by 2002:a05:600c:c4b7:b0:490:b8c0:d46a with SMTP id 5b1f17b1804b1-490e2e45332mr9517125e9.22.1781132003603; Wed, 10 Jun 2026 15:53:23 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00bb749f54eeb85d7b.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:bb74:9f54:eeb8:5d7b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f351d69sm132348771f8f.29.2026.06.10.15.53.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 15:53:23 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH 3/6] layerindexlib: restapi.py: fix unbound variable Date: Thu, 11 Jun 2026 00:53:05 +0200 Message-ID: <3235552aed757545a33db9cea5cfa23907f01673.1781131922.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Wed, 10 Jun 2026 22:53:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19650 From: João Marcos Costa If the requested branch(es) is not found, a debugging message is displayed to list it, so the expected behavior is something like this: $ bitbake-layers layerindex-fetch meta-firefox NOTE: Starting bitbake server... Loading https://layers.openembedded.org/layerindex/api/;branch=wrynose... ERROR: Remote layer index ['https://layers.openembedded.org/layerindex/'] is empty for branches ['wrynose'] However, the variable currently used is unbound, and the error below comes up: File "/src/bitbake/lib/layerindexlib/restapi.py", line 216, in load_index_web logger.debug("No valid branches (%s) found at url %s." % (branch, url)) ^^^^^^ UnboundLocalError: cannot access local variable 'branch' where it is not associated with a value Replace 'branch' by 'branches' to fix this. Signed-off-by: João Marcos Costa Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit df3295f016a74a1414b8af5adb9f2a3967c365b6) Signed-off-by: Yoann Congal --- lib/layerindexlib/restapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/layerindexlib/restapi.py b/lib/layerindexlib/restapi.py index 81d99b02e..65405cb7e 100644 --- a/lib/layerindexlib/restapi.py +++ b/lib/layerindexlib/restapi.py @@ -213,7 +213,7 @@ class RestApiPlugin(layerindexlib.plugin.IndexPlugin): pindex['branches'] = _get_json_response(index.apilinks['branches'] + filter, username=up.username, password=up.password) if not pindex['branches']: - logger.debug("No valid branches (%s) found at url %s." % (branch, url)) + logger.debug("No valid branches (%s) found at url %s." % (branches, url)) return index index.add_raw_element("branches", layerindexlib.Branch, pindex['branches']) From patchwork Wed Jun 10 22:53:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89705 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 CE89CCD98CF for ; Wed, 10 Jun 2026 22:53:28 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.33443.1781132005764784436 for ; Wed, 10 Jun 2026 15:53:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=cALdIyNe; spf=pass (domain: smile.fr, ip: 209.85.128.51, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-490acbb0f89so50063965e9.0 for ; Wed, 10 Jun 2026 15:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781132004; x=1781736804; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Mv/H1P35AS67J8PRe85/IL92ZBNvEdqmnpHcjvdWzHM=; b=cALdIyNeqLw6poIOk/ojAGTzt01IulubncARxiHIQE559EVgXyhnT4T73un/YgLSu7 ZUnAZqguYZbu4Q22LyAdwkPzT6auccwTZ2+7+aGh5x4wUlior+z+PPz9KeLdUCHkTv2I rI6/6AFC3Q7AZSRxMIiDtfsSDzoKTDkqenhC8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781132004; x=1781736804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Mv/H1P35AS67J8PRe85/IL92ZBNvEdqmnpHcjvdWzHM=; b=B9zUMqTO4IpgfaQt3Z5IHz/dFX4cw5i1AuseaNEjNMZ+bLLhP8xCP7HjSNdOTGSrhs 6UCs1UdviKTzEQXVeHroI4p57VC0P0F8NzOj33hfhMIDNF0KoUUCXo9XWJQ/DxpqhB4v U1XZRp7l/Z4Y5NAcAgWRf8VSle5HDat5wCeczkrkJugOAUz7B5If9vy6mMeZZfeg0wty htk58DlZk6jwhLzFGpzXzE29308Fp/cMtk1tmbjoKbgzU70hke28RpERH+N4+UVjsx6+ dPaoe6h5ktf9KqR31bhOXwdpoIJm9qu5kNYojc/n6yUo47oH0PdU8MBGIOZJlo2pVlZw dVLQ== X-Gm-Message-State: AOJu0Yy3bEbF3CmOBD3simMuCEcMyZEz9Wg/xyYipfUEsMeiiHz/Esur ST5cp2nfFF3HYU4EnBGQ/ItQ9LLzuuHa/uRefEXkGWJPSNL/TY27gwey24RsiLoHfZdDqMHqLl0 LHu5G X-Gm-Gg: Acq92OHy8AtTE4XpZnBeXrb8Qg7LRJz9nILaJ82FyI5pIYrCledadeUjRXLvPrtQeCZ tkRlVzywhZCU3YR9Fa/ISB4xMrC/GLHvUXAq5qhNF22jjoED87IJi2fXS1BAPqpsdUzawJsgI+F UBW/ij1q8FdAGUneTDL9AqI8iCIpPz+bVwNg2jDdzdlpkJp0IyS/HXgfdIei7zRMNNoF35Oc6Cx cuzH9yZuKhvVE6jcZfzYQWxkNTTW8rBYaWxgMmrj4sHTiPjXoQumotiOqTFAuGU2PBrGnbvJl7l RfbpnRrxXOEzjTSXGVtMSsdjjaeXBlJ79PpIXTxDFBX+jbs81EYmR6nKwBOlBMEtgVaqh/oJubj ObIysir6I9GT+sUJRx5vxNtJvxk+ymfX3UZeC4A1qbLDzHZnDrcIqjygFfvLl8RMFL2/tNii5M6 ql2V8Szr99bXS150lm6hfAugtfL5blti38bOgUuHs8KiF6EUsdBzyLxraBjDOT4UKbVb1mQgXsF UHsNmIplRnYIuExwnQEAjb6pMEU505/7dY8tGI= X-Received: by 2002:a05:600d:849c:10b0:490:b58a:e6ff with SMTP id 5b1f17b1804b1-490c26e1aeemr294521555e9.22.1781132004118; Wed, 10 Jun 2026 15:53:24 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00bb749f54eeb85d7b.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:bb74:9f54:eeb8:5d7b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f351d69sm132348771f8f.29.2026.06.10.15.53.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 15:53:23 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH 4/6] fetch2/crate: skip yanked versions when reading cargo index Date: Thu, 11 Jun 2026 00:53:06 +0200 Message-ID: X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Wed, 10 Jun 2026 22:53:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19651 From: Thomas Perrot The cargo sparse index marks yanked crate versions with "yanked": true. Treat those the same way as non-existing versions so that version checking never promotes a yanked release as the latest one. Signed-off-by: Thomas Perrot Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 0d757e8dfff7c5d338a01437960d60312e9af490) Signed-off-by: Yoann Congal --- lib/bb/fetch2/crate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bb/fetch2/crate.py b/lib/bb/fetch2/crate.py index b89817ab9..d84bae0bc 100644 --- a/lib/bb/fetch2/crate.py +++ b/lib/bb/fetch2/crate.py @@ -178,7 +178,8 @@ class Crate(Wget): response = self._fetch_index(ud.versionsurl, ud, d) for line in response.splitlines(): data = json.loads(line) - versions.append((0, data["vers"], "")) + if not data.get("yanked", False): + versions.append((0, data["vers"], "")) versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp)) return (versions[-1][1], "") From patchwork Wed Jun 10 22:53:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89706 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 010B2CD98CC for ; Wed, 10 Jun 2026 22:53:29 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.33444.1781132006152310255 for ; Wed, 10 Jun 2026 15:53:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=huRuE5dF; spf=pass (domain: smile.fr, ip: 209.85.221.52, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-45ee5cdbd28so185023f8f.1 for ; Wed, 10 Jun 2026 15:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781132004; x=1781736804; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=dyhsjDUN8PXNd/hMzNzd8ynGnD4A6+mHqMiAuPQBC4c=; b=huRuE5dF7QDoJNpOIo9k64kbGaLRD/SywYRUTsme4ZsYQVUZ3vJYC0XQAS/qHFD7dY mI5UZceGMtQT/bQmpscpyoswK7g7xmgKTCGwqqChLmoeoiSBgkInFrO21Z86PNnHVDBt Q5+3w4rmq/YAyjniVnDWgsmhCxHkNHCzOw2To= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781132004; x=1781736804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=dyhsjDUN8PXNd/hMzNzd8ynGnD4A6+mHqMiAuPQBC4c=; b=ocpprLI+echCRV0TJtA/E0ezSlof06NoeO5i1trtGV5CwDosOqQDpYkA4u9YLH+D0h sGNb3drZWDI8jBVOboSVMf6rMKFMDBpcI6+Zz+uKWj6+xY1SU2IcyuoM9/rW6oiUDE7A /qGVqm5S7upwty/lOV/RSG9ed9RoE1L852oKPIfQxbnb1zZEoL3Ucd2lvanTNWltYTSl /1iH8wXXtC6zfN3tm4dMbU1iMO+HrMQJzL1jU/YNVqgsfhName71OaT2ivPEaAnQ+k7+ AcWT3AcQVSZS3xLg9vWidwRiLwA2tzcANmlBbtoBbQL8Ychx4Sz5Xx8wJhn/T1n2Vz+4 WltA== X-Gm-Message-State: AOJu0YzFlS2cMLMP6Ve0LJqkis0O+b1oSPByDXst2QYBs+cQO9+z198k DyNV2h6BfKJ1FrSddDBVTTmVk9xP1FyaXnkUyPAYE/oLAcd1Unb031sSCB8VRpSAihF8aZsePoh yD9et X-Gm-Gg: Acq92OFtHeFbrZbIdXm5HIE1UGL69FR/E9fl+h89kzBkvLyOvwESRGa/molHx7RtBMZ SfadL4o0WY/DBN0YDP5NBn7oqgiNLANNN29hlCbB/B50QKO23Fh/tl/ixwvrM3ybTR1mZCTl9RP N9rDQM6XSo54VThyxx9fz/1lHzQ5SDjNzRb0g1NHNIEb/gTXO38hY6qIH4tbRAGhWXYA/JKFdS7 vvYQmQQfLgMBPRpaMlgKysQb+VVFKCP7MW9ZRVGRlTSsW64U9S4/E3dnvYZtUubcVN2wPsGgZTa 1851FDhfALS8/GC/RYl2wGg6UjgDk1w9NOm5uAmx18g2GNFYYcAhRi3kz7pT4g/l9/+XVefPwbd bYDMpyW8sNhIJGfP1u6qeXpw261MHcT/AE3ZkgQ8SnmLwMBJ9/V0tG4MzcwAcQBVMMoq9EWC44h 9KTKpebpkFGoYEFmipnAodq7XRVq7odTNkELr/tSfVXgUWXdx8L4dQlG2wuLDdky/0L3Mj/e1eo t7ADZoKeogOkx85blxF7p7yjyG3+2w83qCoDy0= X-Received: by 2002:a05:6000:4615:b0:45e:dd32:92fa with SMTP id ffacd0b85a97d-46067be6a45mr57251f8f.12.1781132004578; Wed, 10 Jun 2026 15:53:24 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00bb749f54eeb85d7b.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:bb74:9f54:eeb8:5d7b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f351d69sm132348771f8f.29.2026.06.10.15.53.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 15:53:24 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH 5/6] fetch2/crate: guard against empty version list Date: Thu, 11 Jun 2026 00:53:07 +0200 Message-ID: <317cdbef364202ea0a857516d65710c95c96bb1a.1781131922.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Wed, 10 Jun 2026 22:53:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19652 From: Thomas Perrot Both latest_versionstring() and latest_versionstring_from_index() would raise IndexError on versions[-1] if the fetched index returns no usable versions. Return ("", "") in that case, consistent with what callers expect when no upstream version can be determined. Signed-off-by: Thomas Perrot Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit ffdc2a02693379d7ead0f7b940111340843d49a4) Signed-off-by: Yoann Congal --- lib/bb/fetch2/crate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bb/fetch2/crate.py b/lib/bb/fetch2/crate.py index d84bae0bc..eb1fd5719 100644 --- a/lib/bb/fetch2/crate.py +++ b/lib/bb/fetch2/crate.py @@ -164,7 +164,7 @@ class Crate(Wget): versions = [(0, i["num"], "") for i in json_data["versions"]] versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp)) - return (versions[-1][1], "") + return (versions[-1][1], "") if versions else ("", "") def latest_versionstring_from_index(self, ud, d): """ @@ -182,4 +182,4 @@ class Crate(Wget): versions.append((0, data["vers"], "")) versions = sorted(versions, key=cmp_to_key(bb.utils.vercmp)) - return (versions[-1][1], "") + return (versions[-1][1], "") if versions else ("", "") From patchwork Wed Jun 10 22:53:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoann Congal X-Patchwork-Id: 89710 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 C0D06CD98C7 for ; Wed, 10 Jun 2026 22:53:28 +0000 (UTC) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.33445.1781132007080319077 for ; Wed, 10 Jun 2026 15:53:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=GZpCO7+t; spf=pass (domain: smile.fr, ip: 209.85.221.47, mailfrom: yoann.congal@smile.fr) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-45ef41adbc1so5470943f8f.0 for ; Wed, 10 Jun 2026 15:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1781132005; x=1781736805; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=H7Z+52ZsMLn6kreMATMSA74FA0v92/MujOswIIy+QuE=; b=GZpCO7+t/yoSGkYzFnQCtbJji9ntsWTB27sADH1K7pmIYO1E5LrEBf5ttOLKneDRgC I223YK8RIHbUJt2JocdU3I6muzhoncwscNrx6BcR+8gXxTeIWGS0lV2jERlbYPuaPNYA CI1AIaIa143xLE1Nx/mgNnOasmcQoSuGeC07U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781132005; x=1781736805; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=H7Z+52ZsMLn6kreMATMSA74FA0v92/MujOswIIy+QuE=; b=JQKS8cXSkGRUpupsPkmT8lnmCZBBpBwPvikHXcKR/xSIUF409OTaZOJQJnO0hfI+T5 BWtXjVwaarM0adtRbZF9jwU7cXaY8r9Cv9drWWlminEk8dmXjJDZ9LqsmuJjGRIen3D5 7mQ8UFx7mDMrZHNLdKKPi/Yy/tAHKT5/pnGjYvm2hqbZUN0KESdqahvFTcxCXmK7vPfs IE50mlILxWomXicxNHLSCfLh9oHiMjxtPAQGDm4KrJa/WUR8PVde7lO+b2L2nANbyi9h YHfG26500K2+76stZm5GCgGr1yNmEzUJi9HUvskJgWZZILN+8h0FAoif5zz/zlOy3VqB v33g== X-Gm-Message-State: AOJu0YxPyCNPuUJq0Xx5h8Vy0Nuvk2zTyoMHfya7KpCLUk1N88W8opLL 4VfLCNigkKVfhtpPHfvwGW8sxr3MXxGEIJJf2MQ44h5u+NYzoqJuumpaZlKn6gMI5CMHKh1+jqO BFORL X-Gm-Gg: Acq92OHa48WkgbwHBV+o1nM7ov+px/RCOPqtMSWQAc7ha2aCVA3I4eTGSuM2oWYAkHp lQ6pTWzPRyZuMJdnIQ4lL4dViBUMO+baLw4SLQ9SAlakuQZaErq+WUEJTi/kdhzYEi/ewue9p03 3cjzpgnwabbaLeG/WBON+VJ8Sn/ivGnPc/gA91MMqFHDBK/whddfX7X3MgmYSLwCZ2nbRF4tExm reOXlTrHlZ2VqKCHLloMgRok6KwwpQYXqOn+OlK8UHoCP7+Bd23ufYO2q7TXCnKWIkm+OIFbWH8 CFwd8k5wBZCe1K32Uz3M5lLCuEqR0QfB5rxSaGpRby25GF8qwD/QiidWbdTPqwkZeRqyAesH3gQ 8lntKQlmdR3N5JDqxRP9uvzB8JJOw4QM2Hvsnp7kOitWyu4FqXHJGI7TIi4ki38a//STXefu3LF hxganjHANxljXy02t00oGqlOBEVZxv2pMmBGqifNMZsCjmFLmebedQGqf181dLiuoi2D4DQdhew cKG3WVLqzHet+swe/uIw0IgGDINNCQLGNEYBm0= X-Received: by 2002:a5d:5f47:0:b0:45e:f266:f4cb with SMTP id ffacd0b85a97d-460677cea88mr235385f8f.22.1781132005410; Wed, 10 Jun 2026 15:53:25 -0700 (PDT) Received: from FRSMI25-LASER.home (2a01cb001331aa00bb749f54eeb85d7b.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:bb74:9f54:eeb8:5d7b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f351d69sm132348771f8f.29.2026.06.10.15.53.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 15:53:24 -0700 (PDT) From: Yoann Congal To: bitbake-devel@lists.openembedded.org Subject: [bitbake][wrynose][2.18][PATCH 6/6] fetch2: allow empty value for params while formatting URI string. Date: Thu, 11 Jun 2026 00:53:08 +0200 Message-ID: <52b3bff42f17933595af48654098b172ea10baff.1781131922.git.yoann.congal@smile.fr> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 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 ; Wed, 10 Jun 2026 22:53:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/19653 From: hongxu While using PREMIRRORS to gets source code, recipe sbom-cve-check-update-nvd-native do fetch failed: $ bitbake sbom-cve-check-update-nvd-native -cfetch -f ... ERROR: sbom-cve-check-update-nvd-native-1.0-r0 do_fetch: Bitbake Fetcher Error: MalformedUrl('git:///path-to-premirror/git/github.com.fkie-cad.nvd-json-data-feeds.git;branch=main;protocol=file;destsuffix') ERROR: Logfile of failure stored in: tmp/work/x86_64-linux/sbom-cve-check-update-nvd-native/1.0/temp/log.do_fetch.4135595 ERROR: Task (oe-core/meta/recipes-devtools/sbom-cve-check/sbom-cve-check-update-nvd-native.bb:do_fetch) failed with exit code '1' ... In oe-core commit [1], destsuffix was configured to empty string through SRC_URI, but in bitbake commit [2], it removed `=' from destsuffix in which value is empty, and trigger MalformedUrl failure, see sbom-cve-check-update-nvd-native do_fetch log: ...log.do_fetch... DEBUG: For url git://github.com/fkie-cad/nvd-json-data-feeds.git;branch=main;protocol=https;destsuffix= returning git:///path-to-premirror/git/github.com.fkie-cad.nvd-json-data-feeds.git;branch=main;protocol=file;destsuffix ...log.do_fetch... This commit use function _query_str_join for query as usual (if a value is None then it isn't a key-value pair, but a bare key.), and use function _param_str_join for params to allow value is empty string and still key-value pair, after applying this commit ...log.do_fetch... DEBUG: For url git://github.com/fkie-cad/nvd-json-data-feeds.git;branch=main;protocol=https;destsuffix= returning git:///path-to-premirror/git/github.com.fkie-cad.nvd-json-data-feeds.git;branch=main;protocol=file;destsuffix= ...log.do_fetch... $ bitbake-selftest -v bb.tests.fetch.URITest.test_uri test_uri (bb.tests.fetch.URITest) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.001s OK [1] https://github.com/openembedded/openembedded-core/commit/131e024a6688074347e08879718221fbfb69033f [2] https://github.com/openembedded/bitbake/commit/eac583bd4c46f3bb9661852cb6a1448f16147ff1 Signed-off-by: Hongxu Jia Signed-off-by: Richard Purdie (cherry picked from commit b3867e6d35ef57239c7ba961a00fa45577600301) Signed-off-by: Yoann Congal --- lib/bb/fetch2/__init__.py | 7 +++++-- lib/bb/tests/fetch.py | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index d913d7511..e0494b3cb 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -304,7 +304,7 @@ class URI(object): def _query_str(self): return ( - ''.join(['?', self._param_str_join(self.query, "&")]) + ''.join(['?', self._query_str_join(self.query, "&")]) if self.query else '') def _param_str_split(self, string, elmdelim, kvdelim="="): @@ -313,9 +313,12 @@ class URI(object): ret[k] = v return ret - def _param_str_join(self, dict_, elmdelim, kvdelim="="): + def _query_str_join(self, dict_, elmdelim, kvdelim="="): return elmdelim.join([kvdelim.join([k, v]) if v else k for k, v in dict_.items()]) + def _param_str_join(self, dict_, elmdelim, kvdelim="="): + return elmdelim.join([kvdelim.join([k, v]) for k, v in dict_.items()]) + @property def hostport(self): if not self.port: diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index cc133c1f5..e661ff0d8 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -292,8 +292,8 @@ class URITest(unittest.TestCase): 'query': {}, 'relative': True }, - "https://www.innodisk.com/Download_file?9BE0BF6657;downloadfilename=EGPL-T101.zip": { - 'uri': 'https://www.innodisk.com/Download_file?9BE0BF6657;downloadfilename=EGPL-T101.zip', + "https://www.innodisk.com/Download_file?9BE0BF6657;downloadfilename=EGPL-T101.zip;someparam=": { + 'uri': 'https://www.innodisk.com/Download_file?9BE0BF6657;downloadfilename=EGPL-T101.zip;someparam=', 'scheme': 'https', 'hostname': 'www.innodisk.com', 'port': None, @@ -303,7 +303,7 @@ class URITest(unittest.TestCase): 'userinfo': '', 'username': '', 'password': '', - 'params': {"downloadfilename" : "EGPL-T101.zip"}, + 'params': {"downloadfilename" : "EGPL-T101.zip", "someparam" : ""}, 'query': {"9BE0BF6657": None}, 'relative': False },