summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-01-07 18:00:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-29 10:37:53 +0000
commitd2d8f3c2a7570bb74db713ddc83059d3b3bd4b2e (patch)
tree0b347bd6bce31954c201f1b2202609d23e2435f8
parent5f6e2a9a474e96332879329deb358219f1328464 (diff)
downloadopenembedded-core-d2d8f3c2a7570bb74db713ddc83059d3b3bd4b2e.tar.gz
openembedded-core-d2d8f3c2a7570bb74db713ddc83059d3b3bd4b2e.tar.bz2
openembedded-core-d2d8f3c2a7570bb74db713ddc83059d3b3bd4b2e.zip
combo-layer: minor refactor
Change get_repos() to assume a list of repository names instead of full list of command line arguments. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-xscripts/combo-layer25
1 files changed, 12 insertions, 13 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 19d64e64e1..37d1f4712d 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -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())