From a046b5465788fe3ab9b5f6373e5f967085998693 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Fri, 16 Jan 2015 11:42:51 +0000 Subject: Fix str_repo_lorry for svn repos Most svn repos use a standard layout, we assume svn repos we want to lorry are using a standard layout, so make str_repo_lorry add 'layout': 'standard' for svn repos --- baserockimport/exts/python.to_lorry | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/baserockimport/exts/python.to_lorry b/baserockimport/exts/python.to_lorry index db33e5f..8ee20eb 100755 --- a/baserockimport/exts/python.to_lorry +++ b/baserockimport/exts/python.to_lorry @@ -188,10 +188,13 @@ def str_repo_lorry(lorry_prefix, package_name, repo_type, url): # TODO: this products field 'x-products-python' # probably shouldn't be hardcoded here - return json.dumps({name: {'type': repo_type, - 'url': url, - 'x-products-python': [package_name]}}, - indent=4, sort_keys=True) + + lorry = {'type': repo_type, 'url': url, 'x-products-python': [package_name]} + + if repo_type == 'svn': + lorry['layout'] = 'standard' + + return json.dumps({name: lorry}, indent=4, sort_keys=True) class PythonLorryExtension(ImportExtension): -- cgit v1.2.1