[bitbake-devel] [PATCH] fetch2: Use correct check in parameter handling in uri_replace()
Nikolai Merinov
n.merinov at inango-systems.com
Mon Jun 18 06:29:05 UTC 2018
Hello,
Any review on this?
Regards,
Nikolai
On 5/13/18 7:48 PM, Nikolai Merinov wrote:
> If uri_find contain parameters then original URI parameters should
> be checked against parameters from uri_find instead of parameters
> from uri_replace.
> ---
> lib/bb/fetch2/__init__.py | 4 ++--
> lib/bb/tests/fetch.py | 2 ++
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
> index 72d6092d..829f1903 100644
> --- a/lib/bb/fetch2/__init__.py
> +++ b/lib/bb/fetch2/__init__.py
> @@ -452,8 +452,8 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None):
> # Handle URL parameters
> if i:
> # Any specified URL parameters must match
> - for k in uri_replace_decoded[loc]:
> - if uri_decoded[loc][k] != uri_replace_decoded[loc][k]:
> + for k in uri_find_decoded[loc]:
> + if uri_decoded[loc][k] != uri_find_decoded[loc][k]:
> return None
> # Overwrite any specified replacement parameters
> for k in uri_replace_decoded[loc]:
> diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
> index 74859f9d..66a9ddb5 100644
> --- a/lib/bb/tests/fetch.py
> +++ b/lib/bb/tests/fetch.py
> @@ -402,6 +402,8 @@ class MirrorUriTest(FetcherTest):
> : "git://somewhere.org/somedir/mtd-utils.git;tag=1234567890123456789012345678901234567890;protocol=http",
> ("git://git.invalid.infradead.org/foo/mtd-utils.git;tag=1234567890123456789012345678901234567890", "git://.*/.*", "git://somewhere.org/somedir/MIRRORNAME;protocol=http")
> : "git://somewhere.org/somedir/git.invalid.infradead.org.foo.mtd-utils.git;tag=1234567890123456789012345678901234567890;protocol=http",
> + ("git://someserver.org/bitbake;tag=1234567890123456789012345678901234567890;branch=master", "git://someserver.org/bitbake;branch=master", "git://git.openembedded.org/bitbake;protocol=http")
> + : "git://git.openembedded.org/bitbake;tag=1234567890123456789012345678901234567890;branch=master;protocol=http",
>
> #Renaming files doesn't work
> #("http://somewhere.org/somedir1/somefile_1.2.3.tar.gz", "http://somewhere.org/somedir1/somefile_1.2.3.tar.gz", "http://somewhere2.org/somedir3/somefile_2.3.4.tar.gz") : "http://somewhere2.org/somedir3/somefile_2.3.4.tar.gz"
--
<http://inango.com>
Nikolai Merinov
Team Leader, 3rd Party Group
n.merinov at inango-systems.com
T +7 343 298 0147 C +7 912 229 2564
inango.com <http://inango.com>Inango on LinkedIn <https://www.linkedin.com/company/inango>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20180618/e20ae02c/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecenobkadjnjjdlh.png
Type: image/png
Size: 1156 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20180618/e20ae02c/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipblnieilfjhndhp.png
Type: image/png
Size: 690 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20180618/e20ae02c/attachment-0005.png>
More information about the bitbake-devel
mailing list