It never works since it is in the middle of transaction.atomic() block, and update.py doesn't need it any more, so remove it.
Signed-off-by: Robert Yang <liezhi.y...@windriver.com> --- layerindex/update.py | 4 +--- layerindex/update_layer.py | 27 --------------------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/layerindex/update.py b/layerindex/update.py index 45dcb86..42dd22b 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -64,15 +64,13 @@ def run_command_interruptible(cmd): return process.returncode, buf -def prepare_update_layer_command(options, branch, layer, updatedeps=False): +def prepare_update_layer_command(options, branch, layer): """Prepare the update_layer.py command line""" if branch.update_environment: cmdprefix = branch.update_environment.get_command() else: cmdprefix = 'python3' cmd = '%s update_layer.py -l %s -b %s' % (cmdprefix, layer.name, branch.name) - if updatedeps: - cmd += ' --update-dependencies' if options.reload: cmd += ' --reload' if options.fullreload: diff --git a/layerindex/update_layer.py b/layerindex/update_layer.py index 0373109..20c27be 100644 --- a/layerindex/update_layer.py +++ b/layerindex/update_layer.py @@ -182,9 +182,6 @@ def main(): parser.add_option("-n", "--dry-run", help = "Don't write any data back to the database", action="store_true", dest="dryrun") - parser.add_option("", "--update-dependencies", - help = "Update layer dependencies only", - action="store_true", dest="updatedeps") parser.add_option("", "--nocheckout", help = "Don't check out branches", action="store_true", dest="nocheckout") @@ -253,30 +250,6 @@ def main(): branchname = layerbranch.actual_branch branchdesc = "%s (%s)" % (options.branch, branchname) - if options.updatedeps: - # Update layer dependencies only - if not layerbranch: - logger.debug('Skipping dependency update for layer %s on branch %s - no layerbranch record' % (layer, branchdesc)) - sys.exit(0) - if not options.nocheckout: - utils.checkout_layer_branch(layerbranch, repodir, logger=logger) - layerdir = os.path.join(repodir, layerbranch.vcs_subdir) - if not os.path.exists(layerdir): - # If this happens it was already flagged during the main update, so ignore it - logger.debug('Skipping dependency update for layer %s on branch %s - layer directory not found' % (layer, branchdesc)) - sys.exit(0) - - layerconfparser = layerconfparse.LayerConfParse(logger=logger, bitbakepath=bitbakepath, tinfoil=tinfoil) - config_data = layerconfparser.parse_layer(layerdir) - if not config_data: - logger.debug("Layer %s does not appear to be valid for branch %s" % (layer.name, branchdesc)) - sys.exit(0) - - utils.add_dependencies(layerbranch, config_data, logger=logger) - utils.add_recommends(layerbranch, config_data, logger=logger) - - sys.exit(0) - # Collect repo info repo = git.Repo(repodir) assert repo.bare == False -- 2.10.2 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto