From 0d3dea3725db41b5197f0f73da01cc3f7322057c Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 20 Sep 2019 09:27:13 +1200 Subject: [PATCH] import_layers: use vcs_last_rev to check if record is updated Unfortunately the "updated" date gets changed every time the repo is fetched (i.e. vcs_last_fetch changes), but that doesn't mean the layerbranch or anything under it has actually changed. Use vcs_last_rev instead although unfortunately that won't catch manual edits to the layerbranch alone. Signed-off-by: Paul Eggleton --- layerindex/tools/import_layers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layerindex/tools/import_layers.py b/layerindex/tools/import_layers.py index ffbe7f1..009abc8 100755 --- a/layerindex/tools/import_layers.py +++ b/layerindex/tools/import_layers.py @@ -323,7 +323,7 @@ def main(): # that already existed, since we need to have those in layer_idmap # to be able to import layer dependencies) existing_layerbranches.remove(layerbranch.id) - if layerbranchjs['updated'] <= layerbranch.updated and not args.reload: + if layerbranchjs['vcs_last_rev'] == layerbranch.vcs_last_rev and not args.reload: logger.debug('Skipping layerbranch %s, already up-to-date' % layerbranchjs['id']) layerbranch_idmap[layerbranchjs['id']] = layerbranch continue