Skip to content

Commit 28e45e8

Browse files
committed
Sync .lib reference in parent repo when updating library
1 parent 64d8ef1 commit 28e45e8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mbed/mbed.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ def clone(url, path=None, hash=None, depth=None, protocol=None):
253253
Bld.init(path, url+'/'+hash)
254254
with cd(path):
255255
if not os.path.exists(arch_dir):
256-
action("Downloading mbed library build \"%s\" (might take a minute)" % hash)
257256
Bld.dlunzip(arch_url, hash)
258257
except Exception as e:
259258
with cd(path):
@@ -266,6 +265,7 @@ def dlunzip(url, hash):
266265
arch_dir = 'mbed-' + hash
267266
try:
268267
if not os.path.exists(tmp_file):
268+
action("Downloading mbed library build \"%s\" (might take a minute)" % hash)
269269
urllib.urlretrieve(url, tmp_file)
270270
except:
271271
if os.path.isfile(tmp_file):
@@ -1464,6 +1464,9 @@ def update(rev=None, clean=False, force=False, ignore=False, top=True, depth=Non
14641464
repo.hashtype(rev, True)))
14651465
repo.scm.update(repo, rev, clean)
14661466
repo.rm_untracked()
1467+
if top and cwd_type == 'library':
1468+
repo.sync()
1469+
repo.write()
14671470

14681471
# Compare library references (.lib) before and after update, and remove libraries that do not have references in the current revision
14691472
for lib in repo.libs:

0 commit comments

Comments
 (0)