combo-layer: minor refactor
Change get_repos() to assume a list of repository names instead of full list of command line arguments. (From OE-Core rev: d2d8f3c2a7570bb74db713ddc83059d3b3bd4b2e) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f51e79b000
commit
62d94a44ae
|
@ -305,18 +305,17 @@ def check_rev_branch(component, repodir, rev, branch):
|
|||
return False
|
||||
return True
|
||||
|
||||
def get_repos(conf, args):
|
||||
def get_repos(conf, repo_names):
|
||||
repos = []
|
||||
if len(args) > 1:
|
||||
for arg in args[1:]:
|
||||
if arg.startswith('-'):
|
||||
break
|
||||
else:
|
||||
repos.append(arg)
|
||||
for repo in repos:
|
||||
if not repo in conf.repos:
|
||||
logger.error("Specified component '%s' not found in configuration" % repo)
|
||||
sys.exit(0)
|
||||
for name in repo_names:
|
||||
if name.startswith('-'):
|
||||
break
|
||||
else:
|
||||
repos.append(name)
|
||||
for repo in repos:
|
||||
if not repo in conf.repos:
|
||||
logger.error("Specified component '%s' not found in configuration" % repo)
|
||||
sys.exit(0)
|
||||
|
||||
if not repos:
|
||||
repos = conf.repos
|
||||
|
@ -327,7 +326,7 @@ def action_pull(conf, args):
|
|||
"""
|
||||
update the component repos only
|
||||
"""
|
||||
repos = get_repos(conf, args)
|
||||
repos = get_repos(conf, args[1:])
|
||||
|
||||
# make sure all repos are clean
|
||||
for name in repos:
|
||||
|
@ -348,7 +347,7 @@ def action_update(conf, args):
|
|||
generate the patch list
|
||||
apply the generated patches
|
||||
"""
|
||||
repos = get_repos(conf, args)
|
||||
repos = get_repos(conf, args[1:])
|
||||
|
||||
# make sure combo repo is clean
|
||||
check_repo_clean(os.getcwd())
|
||||
|
|
Loading…
Reference in New Issue