repos: introduce a new repo conf parameter "type"
This will be used to carry the type of repo we are talking about. At the moment it defaults to "git". Signed-off-by: Henning Schild <henning.schild@siemens.com>
This commit is contained in:
parent
9da82dba13
commit
0c7db599fd
@ -57,3 +57,12 @@ Added
|
|||||||
|
|
||||||
- ``env`` key now allows to pass custom environment variables to the bitbake
|
- ``env`` key now allows to pass custom environment variables to the bitbake
|
||||||
build process.
|
build process.
|
||||||
|
|
||||||
|
Version 7
|
||||||
|
---------
|
||||||
|
|
||||||
|
Added
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
- ``type`` property to ``repos`` to be able to express which version control
|
||||||
|
system to use.
|
||||||
|
@ -28,5 +28,5 @@ __copyright__ = 'Copyright (c) Siemens AG, 2017'
|
|||||||
__version__ = '0.15.0'
|
__version__ = '0.15.0'
|
||||||
|
|
||||||
# Please update docs/format-changelog.rst when changing the file version.
|
# Please update docs/format-changelog.rst when changing the file version.
|
||||||
__file_version__ = 6
|
__file_version__ = 7
|
||||||
__compatible_file_version__ = 1
|
__compatible_file_version__ = 1
|
||||||
|
@ -187,6 +187,7 @@ class Config:
|
|||||||
layers_dict))
|
layers_dict))
|
||||||
url = repo_config_dict[repo].get('url', None)
|
url = repo_config_dict[repo].get('url', None)
|
||||||
name = repo_config_dict[repo].get('name', repo)
|
name = repo_config_dict[repo].get('name', repo)
|
||||||
|
typ = repo_config_dict[repo].get('type', 'git')
|
||||||
refspec = repo_config_dict[repo].get('refspec', None)
|
refspec = repo_config_dict[repo].get('refspec', None)
|
||||||
path = repo_config_dict[repo].get('path', None)
|
path = repo_config_dict[repo].get('path', None)
|
||||||
dis_ops = False
|
dis_ops = False
|
||||||
@ -204,8 +205,9 @@ class Config:
|
|||||||
else:
|
else:
|
||||||
path = path or os.path.join(self.kas_work_dir, name)
|
path = path or os.path.join(self.kas_work_dir, name)
|
||||||
|
|
||||||
rep = Repo.factory(url=url, path=path, refspec=refspec,
|
rep = Repo.factory(url=url, path=path, typ=typ,
|
||||||
layers=layers, disable_operations=dis_ops)
|
refspec=refspec, layers=layers,
|
||||||
|
disable_operations=dis_ops)
|
||||||
repo_dict[repo] = rep
|
repo_dict[repo] = rep
|
||||||
return repo_dict
|
return repo_dict
|
||||||
|
|
||||||
|
@ -114,6 +114,9 @@ CONFIGSCHEMA = {
|
|||||||
'url': {
|
'url': {
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
},
|
},
|
||||||
|
'type': {
|
||||||
|
'type': 'string',
|
||||||
|
},
|
||||||
'refspec': {
|
'refspec': {
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
},
|
},
|
||||||
|
@ -69,12 +69,14 @@ class Repo:
|
|||||||
self.path, self._layers)
|
self.path, self._layers)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def factory(url, path, refspec, layers, disable_operations):
|
def factory(url, path, typ, refspec, layers, disable_operations):
|
||||||
"""
|
"""
|
||||||
Return an instance Repo depending on params.
|
Return an instance Repo depending on params.
|
||||||
"""
|
"""
|
||||||
# pylint: disable=too-many-arguments
|
# pylint: disable=too-many-arguments
|
||||||
return GitRepo(url, path, refspec, layers, disable_operations)
|
if typ == 'git':
|
||||||
|
return GitRepo(url, path, refspec, layers, disable_operations)
|
||||||
|
raise NotImplementedError('Repo typ "%s" not supported.' % typ)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_root_path(path, environ):
|
def get_root_path(path, environ):
|
||||||
|
Loading…
Reference in New Issue
Block a user