diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-06-07 16:52:33 +1200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-06-12 11:33:08 +1200 |
commit | fa3ff04095da83e380e09116c44e7c42394f7822 (patch) | |
tree | 6823d0e6e840434a73a8870ccc2e2addcf77b034 /layerindex/update.py | |
parent | 3919f74a2a60b18f730cf75cc8cedc194bc52e36 (diff) | |
download | openembedded-core-contrib-fa3ff04095da83e380e09116c44e7c42394f7822.tar.gz |
Handle Python 2 and Python 3 branches in the same index
Add a model to support setting a python command and virtualenv per
branch, which allows you to parse master with python3 and krogoth with
python2 for example.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-x | layerindex/update.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/layerindex/update.py b/layerindex/update.py index 157d46f1b7..ac7de5eb72 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -177,7 +177,12 @@ def main(): urldir = layer.get_fetch_dir() repodir = os.path.join(fetchdir, urldir) - cmd = 'python update_layer.py -l %s -b %s' % (layer.name, branch) + branchobj = utils.get_branch(branch) + if branchobj.update_environment: + cmdprefix = branchobj.update_environment.get_command() + else: + cmdprefix = 'python' + cmd = '%s update_layer.py -l %s -b %s' % (cmdprefix, layer.name, branch) if options.reload: cmd += ' --reload' if options.fullreload: |