devtool: sdk-update: fix metadata update step
* Clone the correct path - we need .git on the end * Pull from the specified path instead of expecting a remote to be set * up in the repo already (it isn't by default) (From OE-Core rev: 1a60ee8bd21e156022c928f12bb296ab5caaa766) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
efead10e6f
commit
c1b7d83d77
|
@ -156,11 +156,11 @@ def sdk_update(args, config, basepath, workspace):
|
|||
logger.debug("Updating meta data via git ...")
|
||||
# Try using 'git pull', if failed, use 'git clone'
|
||||
if os.path.exists(os.path.join(basepath, 'layers/.git')):
|
||||
ret = subprocess.call("cd layers && git pull", shell=True)
|
||||
ret = subprocess.call("cd layers && git pull %s/layers/.git" % updateserver, shell=True)
|
||||
else:
|
||||
ret = -1
|
||||
if ret != 0:
|
||||
ret = subprocess.call("rm -rf layers && git clone %s/layers" % updateserver, shell=True)
|
||||
ret = subprocess.call("rm -rf layers && git clone %s/layers/.git" % updateserver, shell=True)
|
||||
if ret != 0:
|
||||
logger.error("Updating meta data via git failed")
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue