aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-22 12:53:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-25 14:17:26 +0100
commit1369bec2404d942acc3618a8d005ec6868dcfd41 (patch)
tree3841c8f21bc019f00ee104ea264580ac0f6f18bf
parent1c531dff2fb055ecab2d462027eecec3fabc2a44 (diff)
downloadbitbake-1369bec2404d942acc3618a8d005ec6868dcfd41.tar.gz
bitbake-1369bec2404d942acc3618a8d005ec6868dcfd41.tar.bz2
bitbake-1369bec2404d942acc3618a8d005ec6868dcfd41.zip
fetch2: Ensure star character doesn't end up in mirror tarball names
If '*' does end up in mirror urls accidently, some strange things can break since supports_checksum() looks for this, ud.localpath can then get ignored and this can lead to empty directories being downloaded "successfully". '*' is a special case for file urls only at this point so remove any entries that accidentlly make it in through url mapping. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py2
-rw-r--r--lib/bb/fetch2/git.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 844f24aa..a38cb8ff 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -492,7 +492,7 @@ def build_mirroruris(origud, mirrors, ld):
replacements["HOST"] = origud.host
replacements["PATH"] = origud.path
replacements["BASENAME"] = origud.path.split("/")[-1]
- replacements["MIRRORNAME"] = origud.host.replace(':','.') + origud.path.replace('/', '.')
+ replacements["MIRRORNAME"] = origud.host.replace(':','.') + origud.path.replace('/', '.').replace('*', '.')
def adduri(uri, ud, uris, uds):
for line in mirrors:
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 1c9a01cf..3676cc3d 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -130,7 +130,7 @@ class Git(FetchMethod):
ud.branches[name] = ud.revisions[name]
ud.revisions[name] = self.latest_revision(ud.url, ud, d, name)
- gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.'))
+ gitsrcname = '%s%s' % (ud.host.replace(':','.'), ud.path.replace('/', '.').replace('*', '.'))
# for rebaseable git repo, it is necessary to keep mirror tar ball
# per revision, so that even the revision disappears from the
# upstream repo in the future, the mirror will remain intact and still