bitbake: toaster: make clone directory name unique
Changed naming scheme for clone directory. Used full git url and branch to make it unique. This should fix the issue with using the same git repository, but different protocols, e.g. git://some.git.repo and http://some.git.repo. [YOCTO #8101] (Bitbake rev: a9baf856a1ef7d84a47fa6615353f5b3fdb8a73b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
552fd83d82
commit
9e1516d2bf
|
@ -181,14 +181,9 @@ class LocalhostBEController(BuildEnvironmentController):
|
||||||
logger.debug("localhostbecontroller: Stopped bitbake server")
|
logger.debug("localhostbecontroller: Stopped bitbake server")
|
||||||
|
|
||||||
def getGitCloneDirectory(self, url, branch):
|
def getGitCloneDirectory(self, url, branch):
|
||||||
""" Utility that returns the last component of a git path as directory
|
"""Construct unique clone directory name out of url and branch."""
|
||||||
"""
|
|
||||||
components = re.split(r'[:\.\/]', url)
|
|
||||||
base = components[-2] if components[-1] == "git" else components[-1]
|
|
||||||
|
|
||||||
if branch != "HEAD":
|
if branch != "HEAD":
|
||||||
return "_%s_%s.toaster_cloned" % (base, branch)
|
return "_%s_%s.toaster_cloned" % (re.sub('[:/]', '_', url), branch)
|
||||||
|
|
||||||
|
|
||||||
# word of attention; this is a localhost-specific issue; only on the localhost we expect to have "HEAD" releases
|
# word of attention; this is a localhost-specific issue; only on the localhost we expect to have "HEAD" releases
|
||||||
# which _ALWAYS_ means the current poky checkout
|
# which _ALWAYS_ means the current poky checkout
|
||||||
|
|
Loading…
Reference in New Issue