fetch2: make sure the uri added as expected
PATCH 1/1 fetch2: make sure the uri added as expected
From: Mingli Yu <[email protected]>
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"
--- lib/bb/fetch2/__init__.py | 2 ++ 1 file changed, 2 insertions(+)
lib/bb/fetch2/__init__.py +2 -0
@@ -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
Signature · 1 line
2.17.1
Quoted 22 lines · Mingli
From: Mingli Yu <[email protected]>
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 <[email protected]>---
lib/bb/fetch2/__init__.py | 2 ++1 file changed, 2 insertions(+)lib/bb/fetch2/__init__.py +0
-0@@ -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 = ['', '', '', '', '', {}]
lib/bb/fetch2/__init__.py +2
-0+ if uri_find_decoded[0] == '.*' and uri_replace_decoded[0] != 'file': + uri_find_decoded[0] = uri_replace_decoded[0]
Quoted 3 lines
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
Quoted 15 lines · Richard Purdie
[Please note: This e-mail is from an EXTERNAL e-mail address]
Quoted 12 lines · Mingli
From: Mingli Yu <[email protected]>
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 <[email protected]>--- lib/bb/fetch2/__init__.py | 2 ++ 1 file changed, 2 insertions(+)
Quoted 16 lines
lib/bb/fetch2/__init__.py def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None): · line 437
Quoted 13 lines
lib/bb/fetch2/__init__.py +2
-0@@ -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 = iI'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,
Quoted 9 lines
Cheers,
Richard
Ping.
Thanks,
Quoted 58 lines · Mingli
Quoted 25 lines · Richard Purdie
[Please note: This e-mail is from an EXTERNAL e-mail address]
Quoted 22 lines · Mingli
From: Mingli Yu <[email protected]>
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 <[email protected]>---
lib/bb/fetch2/__init__.py| 2 ++1 file changed, 2 insertions(+)lib/bb/fetch2/__init__.py +0
-0@@ -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] !=Quoted 8 lines
Quoted 5 lines
'file':
+ uri_find_decoded[0] = uri_replace_decoded[0] for loc, i inenumerate(uri_find_decoded):
result_decoded[loc] = uri_decoded[loc] regexp = iI'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,
Quoted 9 lines
Cheers,
Richard
Quoted 34 lines · Mingli
Quoted 15 lines · Richard Purdie
[Please note: This e-mail is from an EXTERNAL e-mail address]
Quoted 12 lines · Mingli
From: Mingli Yu <[email protected]>
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 <[email protected]>---
lib/bb/fetch2/__init__.py | 2 ++1 file changed, 2 insertions(+)Quoted 16 lines
Quoted 10 lines
lib/bb/fetch2/__init__.py +0
-0@@ -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 = ['', '', '', '', '', {}]
lib/bb/fetch2/__init__.py +2
-0+ if uri_find_decoded[0] == '.*' and uri_replace_decoded[0] != 'file': + uri_find_decoded[0] = uri_replace_decoded[0]Quoted 3 lines
for loc, i in
enumerate(uri_find_decoded):
result_decoded[loc] = uri_decoded[loc]
regexp = iI'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).
Quoted 6 lines
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
Ping.
Thanks,
Quoted 58 lines · Mingli
Quoted 25 lines · Richard Purdie
[Please note: This e-mail is from an EXTERNAL e-mail address]
Quoted 22 lines · Mingli
From: Mingli Yu <[email protected]>
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 <[email protected]>---
lib/bb/fetch2/__init__.py| 2 ++1 file changed, 2 insertions(+)lib/bb/fetch2/__init__.py +0
-0@@ -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] !=Quoted 8 lines
Quoted 5 lines
'file':
+ uri_find_decoded[0] = uri_replace_decoded[0] for loc, i inenumerate(uri_find_decoded):
result_decoded[loc] = uri_decoded[loc] regexp = iI'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,
Quoted 9 lines
Cheers,
Richard
Quoted 1 line · Mingli
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
Quoted 5 lines · Richard Purdie
[Please note: This e-mail is from an EXTERNAL e-mail address]
Quoted 1 line · Mingli
Ping.
Quoted 7 lines
I replied yesterday:
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,
Quoted 5 lines
Cheers,
Richard