diff options
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index e9f8c2a7ec..f1707182a3 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
@@ -268,7 +268,8 @@ class LocalhostBEController(BuildEnvironmentController): | |||
268 | # branch magic name "HEAD" will inhibit checkout | 268 | # branch magic name "HEAD" will inhibit checkout |
269 | if commit != "HEAD": | 269 | if commit != "HEAD": |
270 | logger.debug("localhostbecontroller: checking out commit %s to %s " % (commit, localdirname)) | 270 | logger.debug("localhostbecontroller: checking out commit %s to %s " % (commit, localdirname)) |
271 | self._shellcmd('git fetch --all && git reset --hard "origin/%s"' % commit, localdirname) | 271 | ref = commit if re.match('^[a-fA-F0-9]+$', commit) else 'origin/%s' % commit |
272 | self._shellcmd('git fetch --all && git reset --hard "%s"' % ref, localdirname) | ||
272 | 273 | ||
273 | # take the localdirname as poky dir if we can find the oe-init-build-env | 274 | # take the localdirname as poky dir if we can find the oe-init-build-env |
274 | if self.pokydirname is None and os.path.exists(os.path.join(localdirname, "oe-init-build-env")): | 275 | if self.pokydirname is None and os.path.exists(os.path.join(localdirname, "oe-init-build-env")): |