[bitbake-devel] [PATCH 1/1] fetch2: remove "." in the end

Robert Yang liezhi.yang at windriver.com
Fri Jun 24 07:55:49 UTC 2016


From: Jason Wessel <jason.wessel at windriver.com>

The filename can't be "foo." for MS Windows filesystem, it will renamed
to "foo" automatically, so we can't upload sources like "foo." to the
Windows server, remove "." in the end will fix the problem.

Signed-off-by: Jason Wessel <jason.wessel at windriver.com>
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 bitbake/lib/bb/fetch2/__init__.py | 2 ++
 bitbake/lib/bb/fetch2/git.py      | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index b6fcaaa..1633c81 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -865,6 +865,8 @@ def build_mirroruris(origud, mirrors, ld):
     replacements["PATH"] = origud.path
     replacements["BASENAME"] = origud.path.split("/")[-1]
     replacements["MIRRORNAME"] = origud.host.replace(':','.') + origud.path.replace('/', '.').replace('*', '.')
+    if replacements["MIRRORNAME"].endswith('.'):
+        replacements["MIRRORNAME"] = replacements["MIRRORNAME"][:-1]
 
     def adduri(ud, uris, uds, mirrors):
         for line in mirrors:
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 59827e3..e669efc 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -142,6 +142,8 @@ class Git(FetchMethod):
         gitsrcname = '%s%s' % (ud.host.replace(':', '.'), ud.path.replace('/', '.').replace('*', '.'))
         if gitsrcname.startswith('.'):
             gitsrcname = gitsrcname[1:]
+        if gitsrcname.endswith('.'):
+            gitsrcname = gitsrcname[:-1]
 
         # for rebaseable git repo, it is necessary to keep mirror tar ball
         # per revision, so that even the revision disappears from the
-- 
2.8.2




More information about the bitbake-devel mailing list