mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
devtool: sdk-update: fix pulling updates from git
Commit 4657bc9d165e51981e034e73e7b92552e873eef7 replaced the git pull logic with the git fetch + git reset --hard combo, but resetting to HEAD does not really pull in new commits from remote... Replace with resetting to the upstream branch instead. (From OE-Core rev: 0dcdb146f59a184419bffd4f24cdf8343a43c0ea) Signed-off-by: Andrea Galbusera <gizero@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
0a3bb8b827
commit
6346d12d8d
|
@ -155,7 +155,7 @@ def sdk_update(args, config, basepath, workspace):
|
|||
if os.path.exists(os.path.join(basepath, 'layers/.git')):
|
||||
out = subprocess.check_output("git status --porcelain", shell=True, cwd=layers_dir)
|
||||
if not out:
|
||||
ret = subprocess.call("git fetch --all; git reset --hard", shell=True, cwd=layers_dir)
|
||||
ret = subprocess.call("git fetch --all; git reset --hard @{u}", shell=True, cwd=layers_dir)
|
||||
else:
|
||||
logger.error("Failed to update metadata as there have been changes made to it. Aborting.");
|
||||
logger.error("Changed files:\n%s" % out);
|
||||
|
|
Loading…
Reference in New Issue
Block a user