diff options
| author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2015-01-07 18:00:41 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-29 15:36:51 +0000 |
| commit | 62d94a44ae85055b9812aad694f55d483bf0e642 (patch) | |
| tree | 219f03f4dd21627114373efbc4ffdb93b76491a1 /scripts/combo-layer | |
| parent | f51e79b0004d9d383d93444d74128c5ec1193225 (diff) | |
| download | poky-62d94a44ae85055b9812aad694f55d483bf0e642.tar.gz | |
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>
Diffstat (limited to 'scripts/combo-layer')
| -rwxr-xr-x | scripts/combo-layer | 25 |
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): | |||
| 305 | return False | 305 | return False |
| 306 | return True | 306 | return True |
| 307 | 307 | ||
| 308 | def get_repos(conf, args): | 308 | def get_repos(conf, repo_names): |
| 309 | repos = [] | 309 | repos = [] |
| 310 | if len(args) > 1: | 310 | for name in repo_names: |
| 311 | for arg in args[1:]: | 311 | if name.startswith('-'): |
| 312 | if arg.startswith('-'): | 312 | break |
| 313 | break | 313 | else: |
| 314 | else: | 314 | repos.append(name) |
| 315 | repos.append(arg) | 315 | for repo in repos: |
| 316 | for repo in repos: | 316 | if not repo in conf.repos: |
| 317 | if not repo in conf.repos: | 317 | logger.error("Specified component '%s' not found in configuration" % repo) |
| 318 | logger.error("Specified component '%s' not found in configuration" % repo) | 318 | sys.exit(0) |
| 319 | sys.exit(0) | ||
| 320 | 319 | ||
| 321 | if not repos: | 320 | if not repos: |
| 322 | repos = conf.repos | 321 | repos = conf.repos |
| @@ -327,7 +326,7 @@ def action_pull(conf, args): | |||
| 327 | """ | 326 | """ |
| 328 | update the component repos only | 327 | update the component repos only |
| 329 | """ | 328 | """ |
| 330 | repos = get_repos(conf, args) | 329 | repos = get_repos(conf, args[1:]) |
| 331 | 330 | ||
| 332 | # make sure all repos are clean | 331 | # make sure all repos are clean |
| 333 | for name in repos: | 332 | for name in repos: |
| @@ -348,7 +347,7 @@ def action_update(conf, args): | |||
| 348 | generate the patch list | 347 | generate the patch list |
| 349 | apply the generated patches | 348 | apply the generated patches |
| 350 | """ | 349 | """ |
| 351 | repos = get_repos(conf, args) | 350 | repos = get_repos(conf, args[1:]) |
| 352 | 351 | ||
| 353 | # make sure combo repo is clean | 352 | # make sure combo repo is clean |
| 354 | check_repo_clean(os.getcwd()) | 353 | check_repo_clean(os.getcwd()) |
