summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-09-23 15:34:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 14:11:39 +0100
commit55dc9279c8707a095f058c0e952ef104ee2cbb1d (patch)
tree3a5cf5c7be625a6e68adf78660f0555d11fb9292 /bitbake/lib/toaster/bldcontrol
parent693934031ab26d22793e5bddbcc998473ca5bf42 (diff)
downloadpoky-55dc9279c8707a095f058c0e952ef104ee2cbb1d.tar.gz
bitbake: toaster: fix bug in resetting git repository
git reset --hard should be given either commit id or origin/<ref name> to work properly. Without this fix git will complain that origin/<commit id> does not exist. [YOCTO #7505] (Bitbake rev: ec05beff7d1b06e4df98199925c7102f5684f4e0) 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>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol')
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py3
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")):