All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch2: make sure the uri added as expected
@ 2021-05-14  6:04 Yu, Mingli
  2021-05-14  6:16 ` [bitbake-devel] " Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: Yu, Mingli @ 2021-05-14  6:04 UTC (permalink / raw)
  To: bitbake-devel

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
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [bitbake-devel] [PATCH] fetch2: make sure the uri added as expected
  2021-05-14  6:04 [PATCH] fetch2: make sure the uri added as expected Yu, Mingli
@ 2021-05-14  6:16 ` Richard Purdie
  2021-05-14  7:36   ` Yu, Mingli
       [not found]   ` <167EDE5E75B22E11.24280@lists.openembedded.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Richard Purdie @ 2021-05-14  6:16 UTC (permalink / raw)
  To: Yu, Mingli, bitbake-devel

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).

Cheers,

Richard


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bitbake-devel] [PATCH] fetch2: make sure the uri added as expected
  2021-05-14  6:16 ` [bitbake-devel] " Richard Purdie
@ 2021-05-14  7:36   ` Yu, Mingli
  2021-05-18 10:15     ` Richard Purdie
       [not found]   ` <167EDE5E75B22E11.24280@lists.openembedded.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Yu, Mingli @ 2021-05-14  7:36 UTC (permalink / raw)
  To: Richard Purdie, bitbake-devel



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
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bitbake-devel] [PATCH] fetch2: make sure the uri added as expected
       [not found]   ` <167EDE5E75B22E11.24280@lists.openembedded.org>
@ 2021-05-18  9:25     ` Yu, Mingli
  2021-05-19  2:05     ` Yu, Mingli
  1 sibling, 0 replies; 8+ messages in thread
From: Yu, Mingli @ 2021-05-18  9:25 UTC (permalink / raw)
  To: Richard Purdie, bitbake-devel

Ping.

Thanks,

On 5/14/21 3:36 PM, Yu, Mingli wrote:
> 
> 
> 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
>>
>>
>>
>>
>>
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bitbake-devel] [PATCH] fetch2: make sure the uri added as expected
  2021-05-14  7:36   ` Yu, Mingli
@ 2021-05-18 10:15     ` Richard Purdie
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2021-05-18 10:15 UTC (permalink / raw)
  To: Yu, Mingli, bitbake-devel

On Fri, 2021-05-14 at 15:36 +0800, Yu, Mingli wrote:
> 
> 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.

I understand that. My point is the test suite passes now and doesn't test the issue
you're reporting. If we trust the test suite to be complete, your patch isn't needed
and the code all works.

Obviously the test suite is not complete and needs something adding to it for the
issue you're reporting.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bitbake-devel] [PATCH] fetch2: make sure the uri added as expected
       [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
  1 sibling, 1 reply; 8+ messages in thread
From: Yu, Mingli @ 2021-05-19  2:05 UTC (permalink / raw)
  To: Richard Purdie, bitbake-devel

Ping.

Thanks,

On 5/14/21 3:36 PM, Yu, Mingli wrote:
> 
> 
> 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
>>
>>
>>
>>
>>
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bitbake-devel] [PATCH] fetch2: make sure the uri added as expected
  2021-05-19  2:05     ` Yu, Mingli
@ 2021-05-19  8:03       ` Richard Purdie
  2021-05-19  8:52         ` Yu, Mingli
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2021-05-19  8:03 UTC (permalink / raw)
  To: Yu, Mingli, bitbake-devel

On Wed, 2021-05-19 at 10:05 +0800, Yu, Mingli wrote:
> Ping.

I replied yesterday:

https://lists.openembedded.org/g/bitbake-devel/message/12322

Daily pings are not going to go down too well with me FWIW particularly
when you've not looked at the reply I took time to write and basically
ignored my previous feedback too.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bitbake-devel] [PATCH] fetch2: make sure the uri added as expected
  2021-05-19  8:03       ` Richard Purdie
@ 2021-05-19  8:52         ` Yu, Mingli
  0 siblings, 0 replies; 8+ messages in thread
From: Yu, Mingli @ 2021-05-19  8:52 UTC (permalink / raw)
  To: Richard Purdie, bitbake-devel



On 5/19/21 4:03 PM, Richard Purdie wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
> 
> On Wed, 2021-05-19 at 10:05 +0800, Yu, Mingli wrote:
>> Ping.
> 
> I replied yesterday:
> 
> https://urldefense.com/v3/__https://lists.openembedded.org/g/bitbake-devel/message/12322__;!!AjveYdw8EvQ!Mn-KtCO9cVXaGpBP5QLknAHnTBlqZKyJx-DrSU4Cw_PaCNJWAGStDcj3SIZA3PkcTdw$
> 
> Daily pings are not going to go down too well with me FWIW particularly
> when you've not looked at the reply I took time to write and basically
> ignored my previous feedback too.

Sorry for the noise, seems my email client has some problems here.

I'm working on how to add the test case appropriately.

Thanks,

> 
> Cheers,
> 
> Richard
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-19  8:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.