diff options
| -rwxr-xr-x | scripts/combo-layer | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer index 698d3e3baa..4029d2bff8 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer | |||
| @@ -502,6 +502,10 @@ def check_patch(patchfile): | |||
| 502 | os.rename(patchfile + '.tmp', patchfile) | 502 | os.rename(patchfile + '.tmp', patchfile) |
| 503 | 503 | ||
| 504 | def drop_to_shell(workdir=None): | 504 | def drop_to_shell(workdir=None): |
| 505 | if not sys.stdin.isatty(): | ||
| 506 | print "Not a TTY so can't drop to shell for resolution, exiting." | ||
| 507 | return False | ||
| 508 | |||
| 505 | shell = os.environ.get('SHELL', 'bash') | 509 | shell = os.environ.get('SHELL', 'bash') |
| 506 | print('Dropping to shell "%s"\n' \ | 510 | print('Dropping to shell "%s"\n' \ |
| 507 | 'When you are finished, run the following to continue:\n' \ | 511 | 'When you are finished, run the following to continue:\n' \ |
| @@ -547,7 +551,7 @@ def get_repos(conf, repo_names): | |||
| 547 | for repo in repos: | 551 | for repo in repos: |
| 548 | if not repo in conf.repos: | 552 | if not repo in conf.repos: |
| 549 | logger.error("Specified component '%s' not found in configuration" % repo) | 553 | logger.error("Specified component '%s' not found in configuration" % repo) |
| 550 | sys.exit(0) | 554 | sys.exit(1) |
| 551 | 555 | ||
| 552 | if not repos: | 556 | if not repos: |
| 553 | repos = conf.repos | 557 | repos = conf.repos |
| @@ -695,7 +699,7 @@ def action_update(conf, args): | |||
| 695 | print('You may now edit the patch and patch list in %s\n' \ | 699 | print('You may now edit the patch and patch list in %s\n' \ |
| 696 | 'For example, you can remove unwanted patch entries from patchlist-*, so that they will be not applied later' % patch_dir); | 700 | 'For example, you can remove unwanted patch entries from patchlist-*, so that they will be not applied later' % patch_dir); |
| 697 | if not drop_to_shell(patch_dir): | 701 | if not drop_to_shell(patch_dir): |
| 698 | sys.exit(0) | 702 | sys.exit(1) |
| 699 | 703 | ||
| 700 | # Step 6: apply the generated and revised patch | 704 | # Step 6: apply the generated and revised patch |
| 701 | apply_patchlist(conf, repos) | 705 | apply_patchlist(conf, repos) |
| @@ -761,7 +765,7 @@ def apply_patchlist(conf, repos): | |||
| 761 | if not drop_to_shell(): | 765 | if not drop_to_shell(): |
| 762 | if prevrev != repo['last_revision']: | 766 | if prevrev != repo['last_revision']: |
| 763 | conf.update(name, "last_revision", prevrev) | 767 | conf.update(name, "last_revision", prevrev) |
| 764 | sys.exit(0) | 768 | sys.exit(1) |
| 765 | prevrev = lastrev | 769 | prevrev = lastrev |
| 766 | i += 1 | 770 | i += 1 |
| 767 | # Once all patches are applied, we should update | 771 | # Once all patches are applied, we should update |
