summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorAndrea Galbusera <gizero@gmail.com>2017-07-31 11:19:17 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-09 09:24:16 +0100
commit6346d12d8df311526f6fc625f34ee6b222d8dc8d (patch)
tree6e29cdb30198aaaffeb54b535638ed556bf0c3fe /scripts/lib
parent0a3bb8b8275a37acfacfe9cd76fa726c28c232c8 (diff)
downloadpoky-6346d12d8df311526f6fc625f34ee6b222d8dc8d.tar.gz
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>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/devtool/sdk.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index e8bf0ad98c..f46577c2ab 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -155,7 +155,7 @@ def sdk_update(args, config, basepath, workspace):
155 if os.path.exists(os.path.join(basepath, 'layers/.git')): 155 if os.path.exists(os.path.join(basepath, 'layers/.git')):
156 out = subprocess.check_output("git status --porcelain", shell=True, cwd=layers_dir) 156 out = subprocess.check_output("git status --porcelain", shell=True, cwd=layers_dir)
157 if not out: 157 if not out:
158 ret = subprocess.call("git fetch --all; git reset --hard", shell=True, cwd=layers_dir) 158 ret = subprocess.call("git fetch --all; git reset --hard @{u}", shell=True, cwd=layers_dir)
159 else: 159 else:
160 logger.error("Failed to update metadata as there have been changes made to it. Aborting."); 160 logger.error("Failed to update metadata as there have been changes made to it. Aborting.");
161 logger.error("Changed files:\n%s" % out); 161 logger.error("Changed files:\n%s" % out);