All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Zhukov <pavel@zhukoff.net>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH 1/2] fetch2: kill parameters in uri_find_decoded
Date: Wed, 18 Jan 2023 08:28:28 +0100	[thread overview]
Message-ID: <87lem047v9.fsf@desktop.zhukoff.net> (raw)
In-Reply-To: <c510d7c971e772ce0c2c50229862e2b475e5c4a3.camel@linuxfoundation.org>


Richard Purdie <richard.purdie@linuxfoundation.org> writes:

> On Tue, 2023-01-17 at 16:36 +0100, Pavel Zhukov wrote:
>> Fixes:
>>   File "/bitbake/./lib/bb/fetch2/__init__.py", line 446, in uri_replace
>>     if uri_decoded[loc][k] != uri_find_decoded[loc][k]:
>> KeyError: 'module'
>> 
>> Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
>> ---
>>  bitbake/lib/bb/fetch2/__init__.py | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
>> index 893ec6f6bd..b1cd6b25c2 100644
>> --- a/bitbake/lib/bb/fetch2/__init__.py
>> +++ b/bitbake/lib/bb/fetch2/__init__.py
>> @@ -469,6 +469,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None):
>>                      basename = os.path.basename(mirrortarball)
>>                      # Kill parameters, they make no sense for mirror tarballs
>>                      uri_decoded[5] = {}
>> +                    uri_find_decoded[5] = {}
>>                  elif ud.localpath and ud.method.supports_checksum(ud):
>>                      basename = os.path.basename(ud.localpath)
>>                  if basename:
>
> The fix looks reasonable but is there a test we should be adding to
> cover this scenario?
Mercurial test (second patch in the series) covers this but it will be
executed only if network enabled and mercurial installed so I've modified
existing git premirror local test to cover this change as well:

Subject: [PATCH] fetch2/tests: Add parameter to recipe_uri

>
> Cheers,
>
> Richard



      reply	other threads:[~2023-01-18  7:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 15:36 [PATCH 1/2] fetch2: kill parameters in uri_find_decoded Pavel Zhukov
2023-01-17 15:36 ` [PATCH 2/2] fetch2/tests: Add test for Mercurial Pavel Zhukov
2023-01-17 23:13 ` [bitbake-devel] [PATCH 1/2] fetch2: kill parameters in uri_find_decoded Richard Purdie
2023-01-18  7:28   ` Pavel Zhukov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lem047v9.fsf@desktop.zhukoff.net \
    --to=pavel@zhukoff.net \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.