aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
-rw-r--r--bitbake/lib/bb/fetch2/git.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index b6fcaaad55d..1633c815f62 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 59827e304fa..e669efc2151 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