diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/devtool/upgrade.py | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 10b4f8b5ee..4c268af3a7 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
| @@ -654,18 +654,28 @@ def latest_version(args, config, basepath, workspace): | |||
| 654 | return 0 | 654 | return 0 |
| 655 | 655 | ||
| 656 | def check_upgrade_status(args, config, basepath, workspace): | 656 | def check_upgrade_status(args, config, basepath, workspace): |
| 657 | def _print_status(recipe): | ||
| 658 | print("{:25} {:15} {:15} {} {} {}".format( recipe['pn'], | ||
| 659 | recipe['cur_ver'], | ||
| 660 | recipe['status'] if recipe['status'] != 'UPDATE' else (recipe['next_ver'] if not recipe['next_ver'].endswith("new-commits-available") else "new commits"), | ||
| 661 | recipe['maintainer'], | ||
| 662 | recipe['revision'] if recipe['revision'] != 'N/A' else "", | ||
| 663 | "cannot be updated due to: %s" %(recipe['no_upgrade_reason']) if recipe['no_upgrade_reason'] else "")) | ||
| 657 | if not args.recipe: | 664 | if not args.recipe: |
| 658 | logger.info("Checking the upstream status for all recipes may take a few minutes") | 665 | logger.info("Checking the upstream status for all recipes may take a few minutes") |
| 659 | results = oe.recipeutils.get_recipe_upgrade_status(args.recipe) | 666 | results = oe.recipeutils.get_recipe_upgrade_status(args.recipe) |
| 660 | for result in results: | 667 | for recipegroup in results: |
| 661 | # pn, update_status, current, latest, maintainer, latest_commit, no_update_reason | 668 | upgrades = [r for r in recipegroup if r['status'] != 'MATCH'] |
| 662 | if args.all or result['status'] != 'MATCH': | 669 | currents = [r for r in recipegroup if r['status'] == 'MATCH'] |
| 663 | print("{:25} {:15} {:15} {} {} {}".format( result['pn'], | 670 | if len(upgrades) > 1: |
| 664 | result['cur_ver'], | 671 | print("These recipes need to be upgraded together {") |
| 665 | result['status'] if result['status'] != 'UPDATE' else (result['next_ver'] if not result['next_ver'].endswith("new-commits-available") else "new commits"), | 672 | for r in upgrades: |
| 666 | result['maintainer'], | 673 | _print_status(r) |
| 667 | result['revision'] if result['revision'] != 'N/A' else "", | 674 | if len(upgrades) > 1: |
| 668 | "cannot be updated due to: %s" %(result['no_upgrade_reason']) if result['no_upgrade_reason'] else "")) | 675 | print("}") |
| 676 | for r in currents: | ||
| 677 | if args.all: | ||
| 678 | _print_status(r) | ||
| 669 | 679 | ||
| 670 | def register_commands(subparsers, context): | 680 | def register_commands(subparsers, context): |
| 671 | """Register devtool subcommands from this plugin""" | 681 | """Register devtool subcommands from this plugin""" |
