[bitbake-devel] [bitbake-devel, 1.42, 1.40] git.py: Handle space in git repo name

Ankur Tyagi ankur.tyagi85 at gmail.com
Tue Jul 2 09:07:10 UTC 2019


Signed-off-by: Ankur Tyagi <ankur.tyagi85 at gmail.com>
---
 lib/bb/fetch2/git.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index e171aa7e..5300fa8f 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -236,7 +236,7 @@ class Git(FetchMethod):
                     ud.unresolvedrev[name] = ud.revisions[name]
                 ud.revisions[name] = self.latest_revision(ud, d, name)
 
-        gitsrcname = '%s%s' % (ud.host.replace(':', '.'), ud.path.replace('/', '.').replace('*', '.'))
+        gitsrcname = '%s%s' % (ud.host.replace(':', '.'), ud.path.replace('/', '.').replace('*', '.').replace(" ", "%20"))
         if gitsrcname.startswith('.'):
             gitsrcname = gitsrcname[1:]
 
@@ -459,7 +459,7 @@ class Git(FetchMethod):
             readpathspec = ""
             def_destsuffix = "git/"
 
-        destsuffix = ud.parm.get("destsuffix", def_destsuffix)
+        destsuffix = ud.parm.get("destsuffix", def_destsuffix).replace(" ", "%20")
         destdir = ud.destdir = os.path.join(destdir, destsuffix)
         if os.path.exists(destdir):
             bb.utils.prunedir(destdir)
@@ -574,7 +574,7 @@ class Git(FetchMethod):
             username = ud.user + '@'
         else:
             username = ""
-        return "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path)
+        return "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path.replace(" ", "%20"))
 
     def _revision_key(self, ud, d, name):
         """
-- 
2.22.0.windows.1



More information about the bitbake-devel mailing list