From 05f3bccbc600a4b5a22ae356cd9b74537eda143d Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 7 Nov 2016 11:12:21 +1300 Subject: update_layer: fix regressions in missing layer detection If a layer is removed by its subdirectory being deleted then we want to pick up on that and produce an appropriate error message - so let the layer_update code do the checking out and verifying things are correct before trying to parse layer.conf. This also fixes --nocheckout still checking out a branch. Additionally, drop some code that gets the layerbranch which we just retrieved a few lines above. Signed-off-by: Paul Eggleton --- layerindex/update.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'layerindex/update.py') diff --git a/layerindex/update.py b/layerindex/update.py index ffa2a62b61..060810de63 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -226,9 +226,7 @@ def main(): urldir = layer.get_fetch_dir() repodir = os.path.join(fetchdir, urldir) - layerbranch = layer.get_layerbranch(branch) - if not layerbranch: - continue + utils.checkout_layer_branch(layerbranch, repodir, logger) config_data = layerconfparser.parse_layer(layerbranch, repodir) if not config_data: -- cgit v1.2