[bitbake-devel] [bitbake-devel, 1.42, 1.40, v2] git.py: Handle space in git repo name for http/https protocol

Ankur Tyagi ankur.tyagi85 at gmail.com
Fri Jul 26 02:23:48 UTC 2019


Hi,

Sorry for the late reply but I have figured out where %20 is being stripped out.

File lib/bb/fetch2/__init__.py, method decodeurl(url) is returning
path as urllib.parse.unquote(path) which strips out %20
So if I return path as it is, then %20 is preserved and works as expected.

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index f6b5529b..97fd59e1 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -389,7 +389,7 @@ def decodeurl(url):
                 s1, s2 = s.split('=')
                 p[s1] = s2

-    return type, host, urllib.parse.unquote(path), user, pswd, p
+    return type, host, path, user, pswd, p


Is above change acceptable?

Regards
Ankur

On Wed, Jul 10, 2019 at 4:33 AM Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
>
> On Wed, 2019-07-10 at 21:26 +1200, Ankur Tyagi wrote:
> > Hi,
> >
> > Is there something else that needs to be done in this patch? Or
> > perhaps there is a better to handle this?
> > I am willing to learn and try it out if original patch is not good.
>
> I think Mark is right, we need to figure out where the %20 characters
> are being stripped out and preserve them rather than injecting them
> back in again.
>
> The question is therefore where they're being stripped out in the code?
>
> Cheers,
>
> Richard
>


More information about the bitbake-devel mailing list