All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yu, Mingli" <mingli.yu@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH] fetch2: make sure the uri added as expected
Date: Fri, 14 May 2021 15:36:20 +0800	[thread overview]
Message-ID: <a1696027-fdc3-e705-b4be-871840d14940@windriver.com> (raw)
In-Reply-To: <6517f5c83f3902eb26367fa59b7d07ad1c24f106.camel@linuxfoundation.org>



On 5/14/21 2:16 PM, Richard Purdie wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
> 
> On Fri, 2021-05-14 at 14:04 +0800, Yu, Mingli wrote:
>> From: Mingli Yu <mingli.yu@windriver.com>
>>
>> Make sure the uri added as expected in some scenarioes such as
>> with below setting:
>>
>> PREMIRRORS_append = ".*://.*/.* git:///net/SharedImage/downloads/git2/MIRRORNAME;protocol=file"
>>
>> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
>> ---
>>   lib/bb/fetch2/__init__.py | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
>> index cf0201c4..6701654b 100644
>> --- a/lib/bb/fetch2/__init__.py
>> +++ b/lib/bb/fetch2/__init__.py
>> @@ -430,6 +430,8 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None):
>>       uri_replace_decoded = list(decodeurl(uri_replace))
>>       logger.debug2("For url %s comparing %s to %s" % (uri_decoded, uri_find_decoded, uri_replace_decoded))
>>       result_decoded = ['', '', '', '', '', {}]
>> +    if uri_find_decoded[0] == '.*' and uri_replace_decoded[0] != 'file':
>> +        uri_find_decoded[0] = uri_replace_decoded[0]
>>       for loc, i in enumerate(uri_find_decoded):
>>           result_decoded[loc] = uri_decoded[loc]
>>           regexp = i
> 
> I've not thought too much about the fix itself but for these kinds of changes
> we do ask that the tests be updated too in lib/bb/tests/ (run with bitbake-selftest).

Hi RP,

I think the current testcase(lib/bb/tests/fetch.py) is enough if this 
patch doesn't introduce regression issue(run with bitbake-selftest).

BTW, the patch solves the problem which I stated in the comments.

Thanks,

> 
> Cheers,
> 
> Richard
> 
> 
> 
> 
> 

  reply	other threads:[~2021-05-14  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  6:04 [PATCH] fetch2: make sure the uri added as expected Yu, Mingli
2021-05-14  6:16 ` [bitbake-devel] " Richard Purdie
2021-05-14  7:36   ` Yu, Mingli [this message]
2021-05-18 10:15     ` Richard Purdie
     [not found]   ` <167EDE5E75B22E11.24280@lists.openembedded.org>
2021-05-18  9:25     ` Yu, Mingli
2021-05-19  2:05     ` Yu, Mingli
2021-05-19  8:03       ` Richard Purdie
2021-05-19  8:52         ` Yu, Mingli

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=a1696027-fdc3-e705-b4be-871840d14940@windriver.com \
    --to=mingli.yu@windriver.com \
    --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.