[oe-commits] [openembedded-core] 17/25: devtool: sdk-update: fix pulling updates from git

git at git.openembedded.org git at git.openembedded.org
Wed Aug 9 08:39:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 0dcdb146f59a184419bffd4f24cdf8343a43c0ea
Author: Andrea Galbusera <gizero at gmail.com>
AuthorDate: Mon Jul 31 11:19:17 2017 +0200

    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.
    
    Signed-off-by: Andrea Galbusera <gizero at gmail.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/lib/devtool/sdk.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index e8bf0ad..f46577c 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list