]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: use git reset --hard instead of rebase
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 23 Sep 2015 22:34:54 +0000 (15:34 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Sep 2015 13:11:06 +0000 (14:11 +0100)
Replaced 'git checkout <ref> && git rebase' with 'git reset --hard' as
with git checkout repository ends up with detached HEAD. Rebase makes
things even worse as it can cause conflicts. git reset --hard resets
repository to the required state in a most straightforward and
reliable way.

[YOCTO #7505]

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>
lib/toaster/bldcontrol/localhostbecontroller.py

index e2d9375d3184c1e86f8c22166cc8507abda7c7ac..e9f8c2a7ec85ee0bfd5a943862abdc4a0c70ef97 100644 (file)
@@ -268,7 +268,7 @@ class LocalhostBEController(BuildEnvironmentController):
             # branch magic name "HEAD" will inhibit checkout
             if commit != "HEAD":
                 logger.debug("localhostbecontroller: checking out commit %s to %s " % (commit, localdirname))
-                self._shellcmd("git fetch --all && git checkout \"%s\" && git rebase \"origin/%s\"" % (commit, commit) , localdirname)
+                self._shellcmd('git fetch --all && git reset --hard "origin/%s"' % commit, localdirname)
 
             # take the localdirname as poky dir if we can find the oe-init-build-env
             if self.pokydirname is None and os.path.exists(os.path.join(localdirname, "oe-init-build-env")):