diff options
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/bbcontroller.py')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/bbcontroller.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py index 102606e929..dbfb2f3a04 100644 --- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py +++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py | |||
@@ -81,12 +81,17 @@ def getBuildEnvironmentController(**kwargs): | |||
81 | raise Exception("FIXME: Implement BEC for type %s" % str(be.betype)) | 81 | raise Exception("FIXME: Implement BEC for type %s" % str(be.betype)) |
82 | 82 | ||
83 | 83 | ||
84 | def _getgitcheckoutdirectoryname(url): | 84 | def _get_git_clonedirectory(url, branch): |
85 | """ Utility that returns the last component of a git path as directory | 85 | """ Utility that returns the last component of a git path as directory |
86 | """ | 86 | """ |
87 | import re | 87 | import re |
88 | components = re.split(r'[:\.\/]', url) | 88 | components = re.split(r'[:\.\/]', url) |
89 | return components[-2] if components[-1] == "git" else components[-1] | 89 | base = components[-2] if components[-1] == "git" else components[-1] |
90 | |||
91 | if branch != "HEAD": | ||
92 | return "_%s_%s.toaster_cloned" % (base, branch) | ||
93 | |||
94 | return base | ||
90 | 95 | ||
91 | 96 | ||
92 | class BuildEnvironmentController(object): | 97 | class BuildEnvironmentController(object): |
@@ -166,12 +171,12 @@ class BuildEnvironmentController(object): | |||
166 | raise Exception("Must override setLayers") | 171 | raise Exception("Must override setLayers") |
167 | 172 | ||
168 | 173 | ||
169 | def getBBController(self, brbe): | 174 | def getBBController(self): |
170 | """ returns a BitbakeController to an already started server; this is the point where the server | 175 | """ returns a BitbakeController to an already started server; this is the point where the server |
171 | starts if needed; or reconnects to the server if we can | 176 | starts if needed; or reconnects to the server if we can |
172 | """ | 177 | """ |
173 | if not self.connection: | 178 | if not self.connection: |
174 | self.startBBServer(brbe) | 179 | self.startBBServer() |
175 | self.be.lock = BuildEnvironment.LOCK_RUNNING | 180 | self.be.lock = BuildEnvironment.LOCK_RUNNING |
176 | self.be.save() | 181 | self.be.save() |
177 | 182 | ||